public interface KeyList extends OsidList
Like all OsidLists,
KeyList
provides a
means for accessing Key
elements sequentially either one at
a time or many at a time. Examples:
while (kl.hasNext()) { Key key = kl.getNextKey(); }or
while (kl.hasNext()) { Key[] keys = kl.getNextKeys(kl.available()); }
Modifier and Type | Method and Description |
---|---|
Key |
getNextKey()
Gets the next
Key in this list. |
Key[] |
getNextKeys(long n)
Gets the next set of
Key elements in this list which
must be less than or equal to the number returned from
available(). |
Key getNextKey() throws OperationFailedException
Key
in this list. Key
in this list. The hasNext()
method should be used to test that a next Key
is available before calling this method.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Key[] getNextKeys(long n) throws OperationFailedException
Key
elements in this list which
must be less than or equal to the number returned from
available().
n
- the number of Key
elements requested which
should be less than or equal to available()
Key
elements.
The
length of the array is less than or equal to the number
specified.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented.