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.IteratorAn empty iterator that allows me to traverse in case of null objects.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEmptyIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Always returns false, as an empty iterator.java.lang.Objectnext()Returns a null as we are iterating over nothing.voidremove()Returns a false, as no removal
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Always returns false, as an empty iterator.- Specified by:
hasNextin interfacejava.util.Iterator- Returns:
- false
-
next
public java.lang.Object next()
Returns a null as we are iterating over nothing.- Specified by:
nextin interfacejava.util.Iterator- Returns:
- null
-
remove
public void remove()
Returns a false, as no removal- Specified by:
removein interfacejava.util.Iterator
-
-