T
- the type of elements in the set@Deprecated
public class LimitedSizeSet<T>
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected T[] |
values
Deprecated.
If null, then at least num_values distinct values have been seen.
|
Constructor and Description |
---|
LimitedSizeSet(int max_values)
Deprecated.
Create a new LimitedSizeSet that can hold max_values values.
|
Modifier and Type | Method and Description |
---|---|
void |
add(T elt)
Deprecated.
|
void |
addAll(LimitedSizeSet<? extends T> s)
Deprecated.
|
LimitedSizeSet<T> |
clone()
Deprecated.
|
boolean |
contains(T elt)
Deprecated.
|
int |
max_size()
Deprecated.
An upper bound on how many distinct elements can be individually represented in the set.
|
static <T> LimitedSizeSet<T> |
merge(int max_values,
java.util.List<LimitedSizeSet<? extends T>> slist)
Deprecated.
Merges a list of
LimitedSizeSet<T> 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 T[] values
public LimitedSizeSet(int max_values)
max_values
- the maximum number of values this set will be able to hold; must be positivepublic void add(T elt)
public void addAll(LimitedSizeSet<? extends T> s)
public boolean contains(T elt)
public int size()
public int max_size()
public boolean repNulled()
public LimitedSizeSet<T> clone()
clone
in class java.lang.Object
public static <T> LimitedSizeSet<T> merge(int max_values, java.util.List<LimitedSizeSet<? extends T>> slist)
LimitedSizeSet<T>
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.T
- (super)type of elements of the setsmax_values
- the maximum size for the returned LimitedSizeSetslist
- a list of LimitedSizeSet, whose elements will be mergedpublic java.lang.String toString()
toString
in class java.lang.Object