net.metanotion.util.skiplist
Class SkipSpan
java.lang.Object
net.metanotion.util.skiplist.SkipSpan
- Direct Known Subclasses:
- BSkipSpan
public class SkipSpan
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_SIZE
public static final int MAX_SIZE
- This is actually limited by BlockFile.spanSize which is much smaller
- See Also:
- Constant Field Values
nKeys
public int nKeys
keys
public Comparable[] keys
vals
public Object[] vals
next
public SkipSpan next
prev
public SkipSpan prev
SkipSpan
protected SkipSpan()
SkipSpan
public SkipSpan(int size)
newInstance
public SkipSpan newInstance(SkipList sl)
killInstance
public void killInstance()
flush
public void flush()
print
public String print()
- dumps all the data from here to the end
getEnd
public SkipSpan getEnd()
getSpan
public SkipSpan getSpan(Comparable key,
int[] search)
get
public Object get(Comparable key)
put
public SkipSpan put(Comparable key,
Object val,
SkipList sl)
- Returns:
- the new span if it caused a split, else null if it went in an existing span
remove
public Object[] remove(Comparable key,
SkipList sl)
- Returns:
- An array of two objects or null.
rv[0] is the removed object.
rv[1] is the deleted SkipSpan if the removed object was the last in the SkipSpan.
rv is null if no object was removed.
firstKey
public Comparable firstKey()
- I2P