Class Namespace.EmptyIterator
- java.lang.Object
-
- edu.isi.pegasus.planner.namespace.Namespace.EmptyIterator
-
- All Implemented Interfaces:
java.util.Iterator
- Enclosing class:
- Namespace
protected class Namespace.EmptyIterator extends java.lang.Object implements java.util.Iterator
An empty iterator that allows me to traverse in case of null objects.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EmptyIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Always returns false, as an empty iterator.java.lang.Object
next()
Returns a null as we are iterating over nothing.void
remove()
Returns a false, as no removal
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Always returns false, as an empty iterator.- Specified by:
hasNext
in interfacejava.util.Iterator
- Returns:
- false
-
next
public java.lang.Object next()
Returns a null as we are iterating over nothing.- Specified by:
next
in interfacejava.util.Iterator
- Returns:
- null
-
remove
public void remove()
Returns a false, as no removal- Specified by:
remove
in interfacejava.util.Iterator
-
-