to.etc.util
Class SmallIntSet

java.lang.Object
  extended by to.etc.util.SmallIntSet
All Implemented Interfaces:
java.io.Serializable

public class SmallIntSet
extends java.lang.Object
implements java.io.Serializable

Contains a (small) set of integers. The set is represented by an array of integers, unsorted. Created on Sep 1, 2003

Author:
Frits Jalvingh
See Also:
Serialized Form

Constructor Summary
SmallIntSet()
           
SmallIntSet(int size)
           
 
Method Summary
 void add(int i)
          Add a new member to the set.
 void clear()
           
 boolean contains(int val)
           
 int elementAt(int i)
           
 boolean equals(java.lang.Object other)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmallIntSet

public SmallIntSet()

SmallIntSet

public SmallIntSet(int size)
Method Detail

contains

public boolean contains(int val)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

add

public void add(int i)
Add a new member to the set.

Parameters:
i -

clear

public void clear()

size

public int size()

elementAt

public int elementAt(int i)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object