com.sparsity.sparksee.gdb
Class TypeList

java.lang.Object
  extended by com.sparsity.sparksee.gdb.TypeList
All Implemented Interfaces:
java.lang.Iterable<java.lang.Integer>

public class TypeList
extends java.lang.Object
implements java.lang.Iterable<java.lang.Integer>

Sparksee type identifier list.

It stores a Sparksee node or edge type identifier list.

Use TypeListIterator to access all elements into this collection.

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

Constructor Summary
TypeList()
          Constructor.
TypeList(java.util.Collection<java.lang.Integer> col)
          Creates a new instance from an integer collection.
TypeList(int[] list)
          Creates a new instance from an integer array.
 
Method Summary
 void add(int type)
          Adds a Sparksee type identifier at the end of the list.
 void clear()
          Clears the list.
 int count()
          Number of elements in the list.
 TypeListIterator iterator()
          Gets a new TypeListIterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeList

public TypeList(int[] list)
Creates a new instance from an integer array.

Parameters:
list - Integer array to initialize the instance.

TypeList

public TypeList(java.util.Collection<java.lang.Integer> col)
Creates a new instance from an integer collection.

Parameters:
col - Collection to initialize the instance.

TypeList

public TypeList()
Constructor.

This creates an empty list.

Method Detail

add

public void add(int type)
Adds a Sparksee type identifier at the end of the list.

Parameters:
type - [in] Sparksee type identifier.

clear

public void clear()
Clears the list.


iterator

public TypeListIterator iterator()
Gets a new TypeListIterator.

Specified by:
iterator in interface java.lang.Iterable<java.lang.Integer>
Returns:
TypeListIterator instance.

count

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

Returns:
Number of elements in the list.