public class SortedRefCountedSet<K> extends Object
Constructor and Description |
---|
SortedRefCountedSet()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(K key)
Add a key to the set.
|
void |
add(K key,
int numReferences)
Add a key to the set with the given number of references.
|
void |
clear()
Clear out the collection.
|
long |
getCountPoints()
Returns the number of data points.
|
TreeMap<K,Integer> |
getRefSet() |
K |
maxValue()
Returns the largest key value, or null if the collection is empty.
|
K |
minValue()
Returns the smallest key value, or null if the collection is empty.
|
void |
remove(K key)
Remove a key from the set.
|
void |
setCountPoints(long countPoints) |
public void clear()
public void add(K key)
key
- to addpublic void add(K key, int numReferences)
key
- to addnumReferences
- initial number of referencespublic void remove(K key)
key
- to addIllegalStateException
- is a key is removed that wasn't added to the mappublic K maxValue()
public K minValue()
public long getCountPoints()
public void setCountPoints(long countPoints)