public class TimeSortedHashtable<T extends java.lang.Comparable<T>>
extends java.lang.Object
Constructor and Description |
---|
TimeSortedHashtable() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsValue(T key) |
int |
countValuesAfter(long t)
Count the number of values after specified timestamp
|
long |
getTime(T value)
Note that this does not automatically promote the key.
|
java.lang.Object[] |
pairsAfter(long timestamp,
T[] valuesArray) |
void |
push(T value,
long now)
push()ing an object that is already in
the queue moves that object to the most
recently used position, but doesn't add
a duplicate entry in the queue.
|
void |
removeBefore(long t)
Remove all entries on or before the given time.
|
boolean |
removeValue(T value) |
int |
size() |
public final void push(T value, long now)
now
- public final int size()
public final boolean removeValue(T value)
public final boolean containsValue(T key)
public final long getTime(T value)
public int countValuesAfter(long t)
timestamp
- public final void removeBefore(long t)
public final java.lang.Object[] pairsAfter(long timestamp, T[] valuesArray)