Package org.apache.fop.fo
Class FObj.FObjIterator
- java.lang.Object
-
- org.apache.fop.fo.FObj.FObjIterator
-
- All Implemented Interfaces:
java.util.Iterator<FONode>,java.util.ListIterator<FONode>,FONode.FONodeIterator
- Enclosing class:
- FObj
public static class FObj.FObjIterator extends java.lang.Object implements FONode.FONodeIterator
BasicFONode.FONodeIteratorimplementation
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(FONode newNode)Add the givennewNodeat the current position.FONodefirst()Returns the first node in the list, and decreases the index, so that a subsequent call tohasPrevious()will returnfalsebooleanhasNext()booleanhasPrevious()FONodelast()Returns the last node in the list, and advances the current position, so that a subsequent call tohasNext()will returnfalseFONodenext()intnextIndex()FObjparent()Returns the parent node for this iterator's list of child nodesFONodeprevious()intpreviousIndex()voidremove()Removes the node at the current position.voidset(FONode newNode)Replace the node at the current index with the givennewNode.
-
-
-
Method Detail
-
parent
public FObj parent()
Returns the parent node for this iterator's list of child nodes- Specified by:
parentin interfaceFONode.FONodeIterator- Returns:
- the parent node
-
next
public FONode next()
- Specified by:
nextin interfaceFONode.FONodeIterator- Specified by:
nextin interfacejava.util.Iterator<FONode>- Specified by:
nextin interfacejava.util.ListIterator<FONode>- Returns:
- the next node
-
previous
public FONode previous()
- Specified by:
previousin interfaceFONode.FONodeIterator- Specified by:
previousin interfacejava.util.ListIterator<FONode>- Returns:
- the previous node
-
set
public void set(FONode newNode)
Replace the node at the current index with the givennewNode.- Specified by:
setin interfaceFONode.FONodeIterator- Specified by:
setin interfacejava.util.ListIterator<FONode>- Parameters:
newNode- the new node
-
add
public void add(FONode newNode)
Add the givennewNodeat the current position.- Specified by:
addin interfaceFONode.FONodeIterator- Specified by:
addin interfacejava.util.ListIterator<FONode>- Parameters:
newNode- the new node
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceFONode.FONodeIterator- Specified by:
hasNextin interfacejava.util.Iterator<FONode>- Specified by:
hasNextin interfacejava.util.ListIterator<FONode>- Returns:
trueif there is a next node,falseotherwise
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPreviousin interfaceFONode.FONodeIterator- Specified by:
hasPreviousin interfacejava.util.ListIterator<FONode>- Returns:
trueif there is a previous node,falseotherwise
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfaceFONode.FONodeIterator- Specified by:
nextIndexin interfacejava.util.ListIterator<FONode>- Returns:
- the current index
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfaceFONode.FONodeIterator- Specified by:
previousIndexin interfacejava.util.ListIterator<FONode>- Returns:
- the previous index
-
remove
public void remove()
Removes the node at the current position.- Specified by:
removein interfaceFONode.FONodeIterator- Specified by:
removein interfacejava.util.Iterator<FONode>- Specified by:
removein interfacejava.util.ListIterator<FONode>
-
last
public 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
public FONode 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
-
-