Class Values

java.lang.Object
com.sparsity.sparksee.gdb.Values
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<Value>

public class Values extends Object implements Closeable, 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 Details

    • count

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

      Returns:
      The number of elements into the collection.
    • 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:
    • iterator

      public ValuesIterator iterator(Order order)
      Gets a ValuesIterator.

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

      public ValuesIterator iterator()
      See iterator().

      Creates an Ascendent iterator.

      Specified by:
      iterator in interface Iterable<Value>
    • close

      public void close()
      Closes the Values instance.

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

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable