Package org.apache.fop.fo
Class FObj.FObjIterator
java.lang.Object
org.apache.fop.fo.FObj.FObjIterator
- All Implemented Interfaces:
Iterator<FONode>,ListIterator<FONode>,FONode.FONodeIterator
- Enclosing class:
FObj
Basic
FONode.FONodeIterator implementation-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the givennewNodeat the current position.first()Returns the first node in the list, and decreases the index, so that a subsequent call tohasPrevious()will returnfalsebooleanhasNext()booleanlast()Returns the last node in the list, and advances the current position, so that a subsequent call tohasNext()will returnfalsenext()intparent()Returns the parent node for this iterator's list of child nodesprevious()intvoidremove()Removes the node at the current position.voidReplace the node at the current index with the givennewNode.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Method Details
-
parent
Returns the parent node for this iterator's list of child nodes- Specified by:
parentin interfaceFONode.FONodeIterator- Returns:
- the parent node
-
next
- Specified by:
nextin interfaceFONode.FONodeIterator- Specified by:
nextin interfaceIterator<FONode>- Specified by:
nextin interfaceListIterator<FONode>- Returns:
- the next node
-
previous
- Specified by:
previousin interfaceFONode.FONodeIterator- Specified by:
previousin interfaceListIterator<FONode>- Returns:
- the previous node
-
set
Replace the node at the current index with the givennewNode.- Specified by:
setin interfaceFONode.FONodeIterator- Specified by:
setin interfaceListIterator<FONode>- Parameters:
newNode- the new node
-
add
Add the givennewNodeat the current position.- Specified by:
addin interfaceFONode.FONodeIterator- Specified by:
addin interfaceListIterator<FONode>- Parameters:
newNode- the new node
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceFONode.FONodeIterator- Specified by:
hasNextin interfaceIterator<FONode>- Specified by:
hasNextin interfaceListIterator<FONode>- Returns:
trueif there is a next node,falseotherwise
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceFONode.FONodeIterator- Specified by:
hasPreviousin interfaceListIterator<FONode>- Returns:
trueif there is a previous node,falseotherwise
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceFONode.FONodeIterator- Specified by:
nextIndexin interfaceListIterator<FONode>- Returns:
- the current index
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceFONode.FONodeIterator- Specified by:
previousIndexin interfaceListIterator<FONode>- Returns:
- the previous index
-
remove
public void remove()Removes the node at the current position.- Specified by:
removein interfaceFONode.FONodeIterator- Specified by:
removein interfaceIterator<FONode>- Specified by:
removein interfaceListIterator<FONode>
-
last
Returns the last node in the list, and advances the current position, so that a subsequent call tohasNext()will returnfalse- Specified by:
lastin interfaceFONode.FONodeIterator- Returns:
- the last node in the list
-
first
Returns the first node in the list, and decreases the index, so that a subsequent call tohasPrevious()will returnfalse- Specified by:
firstin interfaceFONode.FONodeIterator- Returns:
- the first node in the list
-