public class IntSet
extends java.lang.Object
Constructor and Description |
---|
IntSet()
Creates an empty set.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
java.lang.Object |
clone()
Returns a clone of the set.
|
boolean |
contains(int test)
True if the set contains the element
|
boolean |
difference(IntSet set)
Calculates the set difference from a and b
|
int |
getMax(int i) |
int |
getMin(int i) |
boolean |
intersection(IntSet set)
Calculates the set intersection of a and b
|
boolean |
isDisjoint(IntSet set)
True if the two sets are disjoint.
|
boolean |
isSubset(IntSet subset)
True if the argument is a subset of the set
|
int |
length() |
void |
negate()
Negate the set
|
void |
negate(int minValue,
int maxValue)
Negate the set within a universe
|
int |
size() |
java.lang.String |
toString()
Returns a visible.
|
void |
union(int value)
Adds a point to the set
|
void |
union(int min,
int max)
Adds the range [min,max] to the set.
|
void |
union(IntSet set)
The union of two sets.
|
void |
unionNegate(IntSet set,
int min,
int max)
The union with the negation of the 2nd set
|
public void clear()
public int length()
public int size()
public int getMin(int i)
public int getMax(int i)
public void union(int min, int max)
public void union(int value)
public void union(IntSet set)
public void unionNegate(IntSet set, int min, int max)
public void negate(int minValue, int maxValue)
public void negate()
public boolean difference(IntSet set)
public boolean intersection(IntSet set)
public boolean contains(int test)
public boolean isSubset(IntSet subset)
public boolean isDisjoint(IntSet set)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object