|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.toolbox.ui.IteratorListModel
Simple adapter to build a Bebop ListModel from a Java Iterator.
Nested Class Summary | |
static interface |
IteratorListModel.KeyFunction
An instance of this interface may be passed to IteratorListModel's constructor for those situations where element.toString() does not produce an appropriate key for a ListModel. |
Field Summary |
Fields inherited from interface com.arsdigita.bebop.list.ListModel |
versionId |
Constructor Summary | |
IteratorListModel(Iterator iterator)
|
|
IteratorListModel(Iterator iterator,
IteratorListModel.KeyFunction keyFunction)
|
Method Summary | |
Object |
getElement()
Get the element for the current list item. |
String |
getKey()
Get the key that uniquely identifies the current list item. |
boolean |
next()
Move to the next list item. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IteratorListModel(Iterator iterator, IteratorListModel.KeyFunction keyFunction)
public IteratorListModel(Iterator iterator)
Method Detail |
public Object getElement()
ListModel
ListModel
and should be documented
there.
This method can only be called successfully if the previous cal to
ListModel.next()
returned true
.
getElement
in interface ListModel
ListModel.next()
public String getKey()
ListModel
This method can only be called successfully if the previous cal to
ListModel.next()
returned true
.
getKey
in interface ListModel
ListModel.next()
public boolean next()
ListModel
false
. The item's key and element can be
accessed with calls to ListModel.getKey()
and ListModel.getElement()
. Initially, the list model is positioned before
the first item, so that next()
has to be called once
before it is possible to access the item.
next
in interface ListModel
true
if the model is positioned on a valid item
after the call returns.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |