@Deprecated
public class LimitedSizeIntSet
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
The advantage of this class over LimitedSizeSet<Integer>
is that it does not autobox
the int values, so it takes less memory.
LimitedSizeSet
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected int[] |
values
Deprecated.
If null, then at least num_values distinct values have been seen.
|
Constructor and Description |
---|
LimitedSizeIntSet(int max_values)
Deprecated.
Create a new LimitedSizeIntSet that can hold max_values values.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int elt)
Deprecated.
|
void |
addAll(LimitedSizeIntSet s)
Deprecated.
|
LimitedSizeIntSet |
clone()
Deprecated.
|
boolean |
contains(int elt)
Deprecated.
|
int |
max_size()
Deprecated.
An upper bound on how many distinct elements can be individually represented in the set.
|
static LimitedSizeIntSet |
merge(int max_values,
java.util.List<LimitedSizeIntSet> slist)
Deprecated.
Merges a list of
LimitedSizeIntSet objects into a single object that represents the
values seen by the entire list. |
boolean |
repNulled()
Deprecated.
Returns true if more elements have been added than this set can contain (which is the integer
that was passed to the constructor when creating this set).
|
int |
size()
Deprecated.
A lower bound on the number of elements in the set.
|
java.lang.String |
toString()
Deprecated.
|
protected int[] values
public LimitedSizeIntSet(int max_values)
max_values
- the maximum number of values this set will be able to hold; must be positivepublic void add(int elt)
public void addAll(LimitedSizeIntSet s)
public boolean contains(int elt)
public int size()
public int max_size()
public boolean repNulled()
public LimitedSizeIntSet clone()
clone
in class java.lang.Object
public static LimitedSizeIntSet merge(int max_values, java.util.List<LimitedSizeIntSet> slist)
LimitedSizeIntSet
objects into a single object that represents the
values seen by the entire list. Returns the new object, whose max_values is the given integer.max_values
- the maximum size for the returned LimitedSizeIntSetslist
- a list of LimitedSizeIntSet, whose elements will be mergedpublic java.lang.String toString()
toString
in class java.lang.Object