|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.collection.SortedRefCountedSet<K>
public class SortedRefCountedSet<K>
Sorted, reference-counting set based on a TreeMap implementation that stores keys and a reference counter for each unique key value. Each time the same key is added, the reference counter increases. Each time a key is removed, the reference counter decreases.
Constructor Summary | |
---|---|
SortedRefCountedSet()
Constructor. |
Method Summary | |
---|---|
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. |
java.util.TreeMap<K,java.lang.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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SortedRefCountedSet()
Method Detail |
---|
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 add
java.lang.IllegalStateException
- is a key is removed that wasn't added to the mappublic K maxValue()
public K minValue()
public long getCountPoints()
public java.util.TreeMap<K,java.lang.Integer> getRefSet()
public void setCountPoints(long countPoints)
|
© 2006-2016 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |