net.metanotion.util.skiplist

## Class SkipSpan

- java.lang.Object
- - net.metanotion.util.skiplist.SkipSpan

Direct Known Subclasses:
  BSkipSpan

    public class SkipSpan
    extends Object

### Field Summary

Fields
`Comparable[]` `keys`
`static int` `MAX_SIZE` This is actually limited by BlockFile.spanSize which is much smaller
`SkipSpan` `next`
`int` `nKeys`
`SkipSpan` `prev`
`Object[]` `vals`

### Constructor Summary

Constructors
`protected` `SkipSpan()`
`` `SkipSpan(int size)`

### Method Summary

Methods
`Comparable` `firstKey()` I2P
`void` `flush()`
`Object` `get(Comparable key)`
`SkipSpan` `getEnd()`
`SkipSpan` `getSpan(Comparable key, int[] search)`
`void` `killInstance()`
`SkipSpan` `newInstance(SkipList sl)`
`String` `print()` dumps all the data from here to the end
`SkipSpan` `put(Comparable key, Object val, SkipList sl)`
`Object[]` `remove(Comparable key, SkipList sl)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### 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

### Constructor Detail

#### SkipSpan

    protected SkipSpan()

#### SkipSpan

    public SkipSpan(int size)

### Method Detail

#### 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