Package nom.tam.util
Class HashedList.HashedListIterator
java.lang.Object
nom.tam.util.HashedList.HashedListIterator
- Enclosing class:
- HashedList<VALUE extends CursorValue<String>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
This index points to the value that would be returned in the next 'next' call. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a keyed entry at the current location.void
Add an unkeyed element to the collection.end()
move to the last element and return that.boolean
hasNext()
boolean
hasPrev()
next()
next
(int count) Returns the count next element in the iteration.prev()
void
remove()
void
Point the iterator to a particular keyed entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
current
private int currentThis index points to the value that would be returned in the next 'next' call.
-
-
Constructor Details
-
HashedListIterator
HashedListIterator(int start)
-
-
Method Details
-
add
Description copied from interface:Cursor
Add a keyed entry at the current location. The new entry is inserted before the entry that would be returned in the next invocation of 'next'. The new element is placed such that it will be called by a prev() call, but not a next() call.The return value for that call is unaffected. Note: this method is not in the Iterator interface. -
add
Description copied from interface:Cursor
Add an unkeyed element to the collection. The new element is placed such that it will be called by a prev() call, but not a next() call. -
end
Description copied from interface:Cursor
move to the last element and return that. -
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<VALUE extends CursorValue<String>>
-
hasPrev
public boolean hasPrev() -
next
- Specified by:
next
in interfaceIterator<VALUE extends CursorValue<String>>
-
next
Description copied from interface:Cursor
Returns the count next element in the iteration. -
prev
-
remove
public void remove()- Specified by:
remove
in interfaceIterator<VALUE extends CursorValue<String>>
-
setKey
Description copied from interface:Cursor
Point the iterator to a particular keyed entry. Point to the end of the list if the key is not found.This method is not in the Iterator interface.
-