to.etc.util
Class SmallIntSet
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SmallIntSet
public SmallIntSet()
SmallIntSet
public SmallIntSet(int size)
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