E
- @StoreNotUseStandardSerialization @StorableClass public abstract class AbstractTreeSupportIterator<E> extends Object implements ListIterator<E>, Serializable
Modifier and Type | Field and Description |
---|---|
protected boolean |
concurrentAccess |
protected boolean |
fromEnd
true if iterate from end
not transient for persistence |
protected int |
modificationCount |
protected TreeSupportNode<E> |
nextNode
the next node, null if none
not transient for persistence |
protected TreeSupportNode<E> |
previousNode
the previous node, null if none
not transient for persistence |
protected TreeSupportNode<E> |
removable
removable node, null if none
not transient for persistence |
protected TreeSupport<E> |
tree
tree iterate in it
not transient for persistence |
Constructor and Description |
---|
AbstractTreeSupportIterator(TreeSupport<E> tree) |
AbstractTreeSupportIterator(TreeSupport<E> tree,
boolean fromEnd) |
Modifier and Type | Method and Description |
---|---|
void |
add(E element) |
protected void |
checkTreeChange() |
protected abstract TreeSupportNode<E> |
firstNode() |
boolean |
hasNext() |
boolean |
hasPrevious() |
protected abstract void |
initializeToBegin() |
protected abstract void |
initializeToEnd() |
protected abstract TreeSupportNode<E> |
lastNode() |
E |
next() |
int |
nextIndex() |
protected abstract void |
nextNodeSetToNextOfNextNode()
set
nextNode to next of itself |
protected abstract void |
nextNodeSetToNextOfOfNextNode() |
protected abstract void |
nextNodeSetToNextOfOfPreviousNode()
set
nextNode to next of previousNode |
protected abstract void |
nextNodeSetToNextOfRemovable() |
E |
previous() |
int |
previousIndex() |
protected abstract void |
previousNodeSetToPreviousNodeOfRemovable() |
protected abstract void |
previousNodeSetToPreviousOfNextNode()
set
previousNode to previous of nextNode |
protected abstract void |
previousNodeSetToPreviousOfPreviousNode()
set
previousNode to previous of itself |
void |
remove() |
void |
set(E element) |
protected abstract int |
size() |
protected final TreeSupport<E> tree
protected TreeSupportNode<E> previousNode
protected TreeSupportNode<E> nextNode
protected TreeSupportNode<E> removable
protected final boolean fromEnd
protected final boolean concurrentAccess
protected int modificationCount
public AbstractTreeSupportIterator(TreeSupport<E> tree)
public AbstractTreeSupportIterator(TreeSupport<E> tree, boolean fromEnd)
tree
- tree iterate in itfromEnd
- true if iterate from endpublic boolean hasNext()
public boolean hasPrevious()
hasPrevious
in interface ListIterator<E>
public E next()
protected abstract void nextNodeSetToNextOfNextNode()
nextNode
to next of itselfpublic E previous()
previous
in interface ListIterator<E>
protected abstract void previousNodeSetToPreviousOfPreviousNode()
previousNode
to previous of itselfpublic int nextIndex()
nextIndex
in interface ListIterator<E>
public int previousIndex()
previousIndex
in interface ListIterator<E>
public void set(E element)
set
in interface ListIterator<E>
public void add(E element)
add
in interface ListIterator<E>
public void remove()
protected abstract void nextNodeSetToNextOfRemovable()
protected abstract void previousNodeSetToPreviousNodeOfRemovable()
protected void checkTreeChange()
protected abstract void initializeToBegin()
protected abstract void initializeToEnd()
protected abstract int size()
protected abstract TreeSupportNode<E> lastNode()
protected abstract TreeSupportNode<E> firstNode()
protected abstract void previousNodeSetToPreviousOfNextNode()
previousNode
to previous of nextNode
protected abstract void nextNodeSetToNextOfOfPreviousNode()
nextNode
to next of previousNode
protected abstract void nextNodeSetToNextOfOfNextNode()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.