edu.upc.dama.dex.core
Class Objects.Iterator

java.lang.Object
  extended by edu.upc.dama.dex.core.Objects.Iterator
All Implemented Interfaces:
java.io.Closeable, java.util.Iterator
Enclosing class:
Objects

public class Objects.Iterator
extends java.lang.Object
implements java.util.Iterator, java.io.Closeable

Iterator to traverse the object identifier in a collection.


Method Summary
 void close()
          Closes the Objects.Iterator.
 boolean hasNext()
          Gets whether there are more object identifiers into the collection.
 boolean isOpen()
          Gets if the Objects.Iterator instance is open.
 java.lang.Long next()
          Gets the next object identifier into the collection and moves forward the iterator.
 void remove()
          Unsupported operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Gets whether there are more object identifiers into the collection.

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if there is at least another object identifier into the collection, false otherwise.

next

public java.lang.Long next()
Gets the next object identifier into the collection and moves forward the iterator.

Specified by:
next in interface java.util.Iterator
Returns:
Object identifier.

remove

public void remove()
Unsupported operation.

Specified by:
remove in interface java.util.Iterator

isOpen

public boolean isOpen()
Gets if the Objects.Iterator instance is open.

Only opened Objects.Iterator instances can execute methods, otherwise they will fail.

Returns:
true if the Objects.Iterator instance is open, false otherwise.

close

public void close()
Closes the Objects.Iterator.

It is important to close Objects.Iterators as soon as possible to free its memory resources.

Specified by:
close in interface java.io.Closeable