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.FONodeIterator
implementation
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(FONode newNode)
Add the givennewNode
at the current position.FONode
first()
Returns the first node in the list, and decreases the index, so that a subsequent call tohasPrevious()
will returnfalse
boolean
hasNext()
boolean
hasPrevious()
FONode
last()
Returns the last node in the list, and advances the current position, so that a subsequent call tohasNext()
will returnfalse
FONode
next()
int
nextIndex()
FObj
parent()
Returns the parent node for this iterator's list of child nodesFONode
previous()
int
previousIndex()
void
remove()
Removes the node at the current position.void
set(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:
parent
in interfaceFONode.FONodeIterator
- Returns:
- the parent node
-
next
public FONode next()
- Specified by:
next
in interfaceFONode.FONodeIterator
- Specified by:
next
in interfacejava.util.Iterator<FONode>
- Specified by:
next
in interfacejava.util.ListIterator<FONode>
- Returns:
- the next node
-
previous
public FONode previous()
- Specified by:
previous
in interfaceFONode.FONodeIterator
- Specified by:
previous
in 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:
set
in interfaceFONode.FONodeIterator
- Specified by:
set
in interfacejava.util.ListIterator<FONode>
- Parameters:
newNode
- the new node
-
add
public void add(FONode newNode)
Add the givennewNode
at the current position.- Specified by:
add
in interfaceFONode.FONodeIterator
- Specified by:
add
in interfacejava.util.ListIterator<FONode>
- Parameters:
newNode
- the new node
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceFONode.FONodeIterator
- Specified by:
hasNext
in interfacejava.util.Iterator<FONode>
- Specified by:
hasNext
in interfacejava.util.ListIterator<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 interfacejava.util.ListIterator<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 interfacejava.util.ListIterator<FONode>
- Returns:
- the current index
-
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interfaceFONode.FONodeIterator
- Specified by:
previousIndex
in interfacejava.util.ListIterator<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 interfacejava.util.Iterator<FONode>
- Specified by:
remove
in 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:
last
in 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:
first
in interfaceFONode.FONodeIterator
- Returns:
- the first node in the list
-
-