|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.knowceans.util.ItemList<E>
public class ItemList<E>
ItemList represents a circular list of items that can be browsed with next and prev commands in jsp pages (eg, result sets). The list ensures uniqueness of its elements with the conservative strategy of the SetVector class. This allows to control the list via its element values. E.g., in a result set with paging, if links such as [first, back, forward, last] in a web page are used, the item associated with the new page can be directly found via this element.
Constructor Summary | |
---|---|
ItemList()
|
|
ItemList(java.util.Collection<? extends E> c)
|
|
ItemList(int initialCapacity)
|
|
ItemList(int initialCapacity,
int capacityIncrement)
|
Method Summary | |
---|---|
E |
getCurr()
|
SetVector<E> |
getData()
get the data vector |
E |
getFirst()
|
E |
getLast()
|
E |
getNext()
|
E |
getPrev()
|
int |
getSize()
the size of the data vector |
int |
getState()
get the state of the list |
E |
goFirst()
|
E |
goLast()
|
E |
goNext()
|
E |
goPrev()
|
void |
setData(SetVector<E> data)
set the data vector |
void |
setState(int newstate)
sets the state of the list, if the state is larger than the size, it is set to zero |
int |
setStateByValue(E newvalue)
set the new state of the variable |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ItemList()
public ItemList(java.util.Collection<? extends E> c)
c
- public ItemList(int initialCapacity, int capacityIncrement)
initialCapacity
- capacityIncrement
- public ItemList(int initialCapacity)
initialCapacity
- Method Detail |
---|
public final int getState()
public final void setState(int newstate)
newstate
- public final int setStateByValue(E newvalue)
newvalue
-
public E getNext()
public E goNext()
public E getCurr()
public E getPrev()
public E goPrev()
public E getLast()
public E goLast()
public E getFirst()
public E goFirst()
public int getSize()
public final SetVector<E> getData()
public final void setData(SetVector<E> data)
data
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |