|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkirk.io.sdl.SDLNormalElementIterator
This class is an Iterator
that iterates over an
SDLNormalElement
given a certain element type filter and optionally a
name.
Field Summary | |
static int |
BOTH
The element type identifier for both elements. |
protected int |
counter
The element counter. |
static int |
DATA_ELEMENT
The element type identifier for data elements. |
protected SDLNormalElement |
element
The element iterated over. |
protected int |
elementtype
The internal (active) element type identifier. |
protected String |
name
The name filtered upon. |
static int |
NORMAL_ELEMENT
The element type identifier for normal elements. |
Constructor Summary | |
SDLNormalElementIterator(SDLNormalElement element)
Constructs a new SDLNormalElementIterator working on the given
SDLNormalElement . |
|
SDLNormalElementIterator(SDLNormalElement element,
int elementtype)
Constructs a new SDLNormalElementIterator working on the given
SDLNormalElement , filtering out all the ones of the given type. |
|
SDLNormalElementIterator(SDLNormalElement element,
String name,
int elementtype)
Constructs a new SDLNormalElementIterator working on the given
SDLNormalElement , filtering out all the ones with the given name,
and of the given type. |
Method Summary | |
boolean |
hasNext()
Returns whether there is a next object to iterate to. |
Object |
next()
Returns the next object and iterates onto it. |
void |
remove()
Removes the current object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SDLNormalElement element
protected String name
protected int elementtype
protected int counter
public static final int BOTH
public static final int NORMAL_ELEMENT
public static final int DATA_ELEMENT
Constructor Detail |
public SDLNormalElementIterator(SDLNormalElement element, String name, int elementtype) throws IllegalArgumentException
SDLNormalElementIterator
working on the given
SDLNormalElement
, filtering out all the ones with the given name,
and of the given type.
element
- The SDLNormalElement
to iterate over.name
- The name to filter on.elementtype
- The type of element to filter on. Legal are
SDLNormalElementIterator.BOTH
,
SDLNormalElementIterator.NORMAL_ELEMENT
and
SDLNormalElementIterator.DATA_ELEMENT
.
IllegalArgumentException
- When the given element is
null
, or the given type is not a legal type.public SDLNormalElementIterator(SDLNormalElement element, int elementtype) throws IllegalArgumentException
SDLNormalElementIterator
working on the given
SDLNormalElement
, filtering out all the ones of the given type.
element
- The SDLNormalElement
to iterate over.elementtype
- The type of element to filter on. Legal are
SDLNormalElementIterator.BOTH
,
SDLNormalElementIterator.NORMAL_ELEMENT
and
SDLNormalElementIterator.DATA_ELEMENT
.
IllegalArgumentException
- When the given element is
null
, or the given type is not a legal type.public SDLNormalElementIterator(SDLNormalElement element) throws IllegalArgumentException
SDLNormalElementIterator
working on the given
SDLNormalElement
.
element
- The SDLNormalElement
to iterate over.
IllegalArgumentException
- When the given element is
null
, or the given type is not a legal type.Method Detail |
public boolean hasNext()
hasNext
in interface Iterator
Iterator.hasNext()
public Object next() throws NoSuchElementException
next
in interface Iterator
NoSuchElementException
- When there are no elements left to iterate to.Iterator.next()
public void remove() throws UnsupportedOperationException, IllegalStateException
Iterator
interface.
remove
in interface Iterator
UnsupportedOperationException
- If this method is not supported. Which
it isn't.
IllegalStateException
- If this object is not in the state to do this
method.Iterator.remove()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |