jopt.csp.util
Interface NumSet

All Known Implementing Classes:
DoubleSet, FloatSet, IntSet, LongSet

public interface NumSet

Interface implemented by all numeric sets


Method Summary
 void addAll(NumSet set)
          Adds all values in another set to this set.
 void clear()
          Removes all values from the set.
 java.lang.Object clone()
          Creates a duplicate of this set
 void removeAll(NumSet set)
          Removes all values in a given set
 void retainAll(NumSet set)
          Retains only given values in a given set.
 int size()
          Returns the size of the set.
 NumberIterator values()
          Returns an iterator containing all values in the set
 

Method Detail

size

public int size()
Returns the size of the set. If any real intervals (e.g. float intervals or double intervals) are in the set, returns Integer.MAX_VALUE.


clear

public void clear()
Removes all values from the set. Set will be empty after this method is run.


clone

public java.lang.Object clone()
Creates a duplicate of this set


addAll

public void addAll(NumSet set)
Adds all values in another set to this set. The set will become the union of the two sets.


removeAll

public void removeAll(NumSet set)
Removes all values in a given set


retainAll

public void retainAll(NumSet set)
Retains only given values in a given set. The set will become the intersection of the the two sets.


values

public NumberIterator values()
Returns an iterator containing all values in the set