org.siebengeisslein.indexedlist
Class LongKeys

java.lang.Object
  extended by org.siebengeisslein.client.Persistent
      extended by org.siebengeisslein.indexedlist.LongKeys
All Implemented Interfaces:
Instrumented, BTreeNodeKeys<java.lang.Long>

public class LongKeys
extends Persistent
implements BTreeNodeKeys<java.lang.Long>


Constructor Summary
LongKeys(int nodeSize)
           
 
Method Summary
 int findIndex(java.lang.Long key)
           
 int findIndex(java.lang.Long key, java.util.Comparator<java.lang.Long> c)
          This code is duplicated in all BTreeNodeKeys implementations for performance reasons (replacing keys[pos] with get(pos) would result in an additional readLock() call on the keys).
 java.lang.Long get(int i)
           
 java.lang.Long getLastKey()
           
 int getMaxSize()
           
 int insert(java.lang.Long key)
           
 void remove(int index)
           
 void set(int index, java.lang.Long key)
           
 int size()
           
 BTreeNodeKeys split(int splitIndex)
           
 
Methods inherited from class org.siebengeisslein.client.Persistent
abort, clearUserLocals, clone, commit, disposeTransient, getGroup, getRef, getTransientValue, hashCode, initTransient, isWriteTransaction, joinWriteTransaction, readLock, setGroup, setTransientValue, toPersistent, toRef, writeExternal, writeLock
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongKeys

public LongKeys(int nodeSize)
Method Detail

get

public java.lang.Long get(int i)
Specified by:
get in interface BTreeNodeKeys<java.lang.Long>

getMaxSize

public int getMaxSize()
Specified by:
getMaxSize in interface BTreeNodeKeys<java.lang.Long>

size

public int size()
Specified by:
size in interface BTreeNodeKeys<java.lang.Long>

insert

public int insert(java.lang.Long key)
Specified by:
insert in interface BTreeNodeKeys<java.lang.Long>

set

public void set(int index,
                java.lang.Long key)
Specified by:
set in interface BTreeNodeKeys<java.lang.Long>

findIndex

public int findIndex(java.lang.Long key)
Specified by:
findIndex in interface BTreeNodeKeys<java.lang.Long>

getLastKey

public java.lang.Long getLastKey()
Specified by:
getLastKey in interface BTreeNodeKeys<java.lang.Long>

split

public BTreeNodeKeys split(int splitIndex)
Specified by:
split in interface BTreeNodeKeys<java.lang.Long>

remove

public void remove(int index)
Specified by:
remove in interface BTreeNodeKeys<java.lang.Long>

findIndex

public int findIndex(java.lang.Long key,
                     java.util.Comparator<java.lang.Long> c)
This code is duplicated in all BTreeNodeKeys implementations for performance reasons (replacing keys[pos] with get(pos) would result in an additional readLock() call on the keys).

Specified by:
findIndex in interface BTreeNodeKeys<java.lang.Long>