public class RowEntries
extends java.lang.Object
For the user point of view, RowEntries contains the keys of the logs in the table: the keys in position i is the key of the log shown in the table in position i.
Implementation note.
Even if logically, the entry in position i contains the key of the
log to show in the row i of the table, to improve performances,
new keys are appended in the tail of the vector instead
of being inserted in the head i.e. the key of the first log (in row 0) is
is the last key of the vector (in position size-1). For this reason, get(int)
convert from the passed index to the real position in the list.
| Constructor and Description |
|---|
RowEntries() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Integer key)
Add the passed key to the list of entries.
|
void |
clear() |
java.lang.Integer |
get(int row)
Return the key at the given row of the table.
|
int |
indexOf(java.lang.Integer key)
Return the position (i.e.
|
java.util.List<java.lang.Integer> |
removeFirstEntries(int numOfEntries)
Remove the first
numOfEntries entries from the
array. |
java.util.List<java.lang.Integer> |
removeLastEntries(int numOfEntries)
Remove the oldest
numOfEntries entries from the
array. |
int |
size() |
public java.util.List<java.lang.Integer> removeLastEntries(int numOfEntries)
numOfEntries entries from the
array.numOfEntries - public java.util.List<java.lang.Integer> removeFirstEntries(int numOfEntries)
numOfEntries entries from the
array.numOfEntries - public int size()
List.size()public void add(java.lang.Integer key)
To improve performances, the key is appended at the end of the vector
key - The integer key to add to the listpublic java.lang.Integer get(int row)
For a deeper understanding of the algorithm, read the implementation note
in RowEntries.
index - The index of the key to getpublic void clear()
List.clear()public int indexOf(java.lang.Integer key)
For a deeper understanding of the algorithm, read the implementation note
in RowEntries.
key - The key to look for in the table