com.sparsity.dex.gdb
Class Values

java.lang.Object
  extended by com.sparsity.dex.gdb.Values
All Implemented Interfaces:
java.io.Closeable, java.lang.Iterable<Value>

public class Values
extends java.lang.Object
implements java.io.Closeable, java.lang.Iterable<Value>

Value set class.

This is a set of Value instances, that is there is no duplicated elements.

Use a ValuesIterator to traverse all the elements into the set.

When the Values instance is closed, it closes all existing and non-closed ValuesIterator instances too.

Author:
Sparsity Technologies http://www.sparsity-technologies.com

Method Summary
 void close()
          Closes the Values instance.
 long count()
          Gets the number of elements into the collection.
 boolean isClosed()
          Gets if Values instance has been closed or not.
 ValuesIterator iterator()
          See iterator().
 ValuesIterator iterator(Order order)
          Gets a ValuesIterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

iterator

public ValuesIterator iterator()
See iterator().

Creates an Ascendent iterator.

Specified by:
iterator in interface java.lang.Iterable<Value>

count

public long count()
Gets the number of elements into the collection.

Returns:
The number of elements into the collection.

iterator

public ValuesIterator iterator(Order order)
Gets a ValuesIterator.

Parameters:
order - [in] Ascending or descending order.
Returns:
ValuesIterator instance.

isClosed

public boolean isClosed()
Gets if Values instance has been closed or not.

Returns:
TRUE if the Values instance has been closed, FALSE otherwise.
See Also:
close()

close

public void close()
Closes the Values instance.

It must be called to ensure the integrity of all data.

Specified by:
close in interface java.io.Closeable