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 TypeMethodDescriptionvoid
Add the givennewNode
at the current position.first()
Returns the first node in the list, and decreases the index, so that a subsequent call tohasPrevious()
will returnfalse
boolean
hasNext()
boolean
last()
Returns the last node in the list, and advances the current position, so that a subsequent call tohasNext()
will returnfalse
next()
int
parent()
Returns the parent node for this iterator's list of child nodesprevious()
int
void
remove()
Removes the node at the current position.void
Replace 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, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Method Details
-
parent
Returns the parent node for this iterator's list of child nodes- Specified by:
parent
in interfaceFONode.FONodeIterator
- Returns:
- the parent node
-
next
- Specified by:
next
in interfaceFONode.FONodeIterator
- Specified by:
next
in interfaceIterator<FONode>
- Specified by:
next
in interfaceListIterator<FONode>
- Returns:
- the next node
-
previous
- Specified by:
previous
in interfaceFONode.FONodeIterator
- Specified by:
previous
in interfaceListIterator<FONode>
- Returns:
- the previous node
-
set
Replace the node at the current index with the givennewNode
.- Specified by:
set
in interfaceFONode.FONodeIterator
- Specified by:
set
in interfaceListIterator<FONode>
- Parameters:
newNode
- the new node
-
add
Add the givennewNode
at the current position.- Specified by:
add
in interfaceFONode.FONodeIterator
- Specified by:
add
in interfaceListIterator<FONode>
- Parameters:
newNode
- the new node
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceFONode.FONodeIterator
- Specified by:
hasNext
in interfaceIterator<FONode>
- Specified by:
hasNext
in interfaceListIterator<FONode>
- Returns:
true
if there is a next node,false
otherwise
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceFONode.FONodeIterator
- Specified by:
hasPrevious
in interfaceListIterator<FONode>
- Returns:
true
if there is a previous node,false
otherwise
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceFONode.FONodeIterator
- Specified by:
nextIndex
in interfaceListIterator<FONode>
- Returns:
- the current index
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceFONode.FONodeIterator
- Specified by:
previousIndex
in interfaceListIterator<FONode>
- Returns:
- the previous index
-
remove
public void remove()Removes the node at the current position.- Specified by:
remove
in interfaceFONode.FONodeIterator
- Specified by:
remove
in interfaceIterator<FONode>
- Specified by:
remove
in 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:
last
in 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:
first
in interfaceFONode.FONodeIterator
- Returns:
- the first node in the list
-