|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsears.search.data.ListOfRow
public class ListOfRow
If elements added is not bigger or equals than the last one it do not correspond and it not added...
Constructor Summary | |
---|---|
ListOfRow()
Creates a new list with initial capacity set to default: 10 |
|
ListOfRow(int inititialCapacity)
Creates a new empty list with capacity set to initialCapacity |
Method Summary | |
---|---|
boolean |
add(int indexOfOccurrence)
Add a new item in the list Item must be positive and no have entry in the list |
void |
clear()
Empty the list |
int |
getIndexOfRow(int row)
Dichotomic search, gets the index of the row contained in the list |
int |
getRow(int index)
Gets the row at index given in parameter |
boolean |
isEmpty()
Tests if the list is empty or not |
LoopIterator |
iterator()
Returns a new LoopIterator object over the list |
int |
size()
Gets the size of the list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListOfRow()
public ListOfRow(int inititialCapacity)
inititialCapacity
- the initial capacity of the listMethod Detail |
---|
public boolean add(int indexOfOccurrence)
indexOfOccurrence
- a positive int
java.lang.IllegalArgumentException
- if indexOfOccurencce is negativepublic int getRow(int index)
index
- the index in the list
index
, -1 if the list is empty
java.lang.IndexOutOfBoundsException
- if index is bigger than the list's capacitypublic int getIndexOfRow(int row)
row
- the row to search
row
or -1 if the row is not in the listpublic void clear()
public boolean isEmpty()
public int size()
public LoopIterator iterator()
LoopIterator
object over the list
LoopIterator
for this listLoopIterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |