Class OIDList

java.lang.Object
com.sparsity.sparksee.gdb.OIDList
All Implemented Interfaces:
Iterable<Long>

public class OIDList extends Object implements Iterable<Long>
Sparksee object identifier list.

It stores a Sparksee object identifier list.

Use OIDListIterator to access all elements into this collection.

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

    • OIDList

      public OIDList(Collection<Long> col)
      Creates a new instance from a long collection.

      Parameters:
      col - Collection to initialize the instance.
    • OIDList

      public OIDList(int numInvalidOIDs)
      Constructor.

      This creates a list with N invalid oids.

      Parameters:
      numInvalidOIDs - [in] The number of invalid oids added to the list.
    • OIDList

      public OIDList(long[] list)
      Creates a new instance from a long array.

      Parameters:
      list - Long array to initialize the instance.
    • OIDList

      public OIDList()
      Constructor.

      This creates an empty list.

  • Method Details

    • clear

      public void clear()
      Clears the list.

    • set

      public void set(int pos, long oid)
      Sets a Sparksee object identifier at the specified position of the list.

      Parameters:
      pos - [in] List position [0..Count()-1].
      oid - [in] Sparksee object identifier.
    • iterator

      public OIDListIterator iterator()
      Gets a new OIDListIterator.

      Specified by:
      iterator in interface Iterable<Long>
      Returns:
      OIDListIterator instance.
    • add

      public void add(long attr)
      Adds a Sparksee object identifier at the end of the list.

      Parameters:
      attr - [in] Sparksee object identifier.
    • count

      public int count()
      Number of elements in the list.

      Returns:
      Number of elements in the list.