Package org.apache.fop.fo
Interface FONode.FONodeIterator
- All Superinterfaces:
Iterator<FONode>
,ListIterator<FONode>
- All Known Implementing Classes:
FObj.FObjIterator
- Enclosing class:
- FONode
Base iterator interface over a FO's children, offering three methods on top of the base interface
methods.
-
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 interface java.util.Iterator
forEachRemaining
-
Method Details
-
next
FONode next() -
previous
FONode previous()- 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 interfaceListIterator<FONode>
- Parameters:
newNode
- the new node
-
add
Add the givennewNode
at the current position.- Specified by:
add
in interfaceListIterator<FONode>
- Parameters:
newNode
- the new node
-
hasNext
boolean hasNext() -
hasPrevious
boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator<FONode>
- Returns:
true
if there is a previous node,false
otherwise
-
nextIndex
int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<FONode>
- Returns:
- the current index
-
previousIndex
int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<FONode>
- Returns:
- the previous index
-
remove
void remove()Removes the node at the current position. -
parent
FObj parent()Returns the parent node for this iterator's list of child nodes- Returns:
- the parent node
-
first
FONode first()Returns the first node in the list, and decreases the index, so that a subsequent call tohasPrevious()
will returnfalse
- Returns:
- the first node in the list
-
last
FONode last()Returns the last node in the list, and advances the current position, so that a subsequent call tohasNext()
will returnfalse
- Returns:
- the last node in the list
-