com.sparsity.dex.gdb
Class OIDList

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

public class OIDList
extends java.lang.Object
implements java.lang.Iterable<java.lang.Long>

Dex object identifier list.

It stores a Dex object identifier list.

Use OIDListIterator to access all elements into this collection.

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

Constructor Summary
OIDList()
          Constructor.
OIDList(java.util.Collection<java.lang.Long> col)
          Creates a new instance from a long collection.
OIDList(int N)
          Constructor.
OIDList(long[] list)
          Creates a new instance from a long array.
 
Method Summary
 void add(long attr)
          Adds a Dex object identifier at the end of the list.
 void clear()
          Clears the list.
 int count()
          Number of elements in the list.
 OIDListIterator iterator()
          Gets a new OIDListIterator.
 void set(int pos, long oid)
          Sets a Dex object identifier at the specified position of the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OIDList

public OIDList(int N)
Constructor.

This creates a list with N invalid oids.

Parameters:
N - null

OIDList

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

Parameters:
list - Long array to initialize the instance.

OIDList

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

Parameters:
col - Collection to initialize the instance.

OIDList

public OIDList()
Constructor.

This creates an empty list.

Method Detail

add

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

Parameters:
attr - [in] Dex object identifier.

clear

public void clear()
Clears the list.


set

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

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

iterator

public OIDListIterator iterator()
Gets a new OIDListIterator.

Specified by:
iterator in interface java.lang.Iterable<java.lang.Long>
Returns:
OIDListIterator instance.

count

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

Returns:
Number of elements in the list.