com.sparsity.sparksee.gdb
Class AttributeList

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

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

Sparksee attribute identifier list.

It stores a Sparksee attribute identifier list.

Use AttributeListIterator to access all elements into this collection.

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

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

Constructor Detail

AttributeList

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

Parameters:
col - Collection to initialize the instance.

AttributeList

public AttributeList()
Constructor.

This creates an empty list.


AttributeList

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

Parameters:
list - Integer array to initialize the instance.
Method Detail

clear

public void clear()
Clears the list.


iterator

public AttributeListIterator iterator()
Gets a new AttributeListIterator.

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

count

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

Returns:
Number of elements in the list.

add

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

Parameters:
attr - [in] Sparksee attribute identifier.