|
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.ethz.mxquery.sms.btree.LeafArrayMap
public class LeafArrayMap
Helper for b-tree leaves. Has to be taylored to different key and value types manually as Generics would use Complex type (inefficent) instead of native types.
Constructor Summary | |
---|---|
LeafArrayMap(int n)
Instantiates a Leaf Array Map |
Method Summary | |
---|---|
void |
addAtPos(DeweyIdentifier key,
LinguisticToken value,
int pos)
Adds the given mapping at the given position in this array. |
int |
binarySearch(java.util.Vector a,
DeweyIdentifier key,
int from,
int to)
This binary search method is modified to guarantee that, in the presence of duplicate keys, we will always return the first occurrence of a found key in the portion of the array being searched (from-to). |
int |
continueGet(int pos,
DeweyIdentifier key,
BtreePushOperator results)
|
int |
continueScan(int pos,
DeweyIdentifier highKey,
BtreePushOperator results)
|
void |
deleteAtPos(int i)
Deletes the value and key at position i |
int |
get(DeweyIdentifier key,
BtreePushOperator results)
Gets the values for the specified key and pushes them in the given push operator. |
int |
getFirstKeyAfter(DeweyIdentifier key,
int[] atPos)
|
int |
getLastKeyBefore(DeweyIdentifier key,
int[] atPos)
|
DeweyIdentifier |
getMidKey()
|
int |
queryRange(DeweyIdentifier lowKey,
DeweyIdentifier highKey,
BtreePushOperator results)
Obtains all values mapped to the given key range in this array. |
boolean |
remove(DeweyIdentifier key,
LinguisticToken value)
Remove mappings with the given key. |
int |
size()
|
LeafArrayMap |
split()
Splits this map. |
java.lang.String |
toString()
|
boolean |
tryAdd(DeweyIdentifier key,
LinguisticToken value)
Associates the given key with the given value in this array map, if the insertion point for the key may be found here. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LeafArrayMap(int n)
n
- the size of the LeafArrayMapMethod Detail |
---|
public int binarySearch(java.util.Vector a, DeweyIdentifier key, int from, int to)
a
- key
- from
- to
-
public DeweyIdentifier getMidKey()
public LeafArrayMap split()
public boolean tryAdd(DeweyIdentifier key, LinguisticToken value)
key
- value
-
public void addAtPos(DeweyIdentifier key, LinguisticToken value, int pos)
key
- value
- pos
- public int get(DeweyIdentifier key, BtreePushOperator results)
public int getFirstKeyAfter(DeweyIdentifier key, int[] atPos)
public int getLastKeyBefore(DeweyIdentifier key, int[] atPos)
public int continueGet(int pos, DeweyIdentifier key, BtreePushOperator results)
public boolean remove(DeweyIdentifier key, LinguisticToken value)
key
- value
-
public java.lang.String toString()
toString
in class java.lang.Object
public int size()
public int queryRange(DeweyIdentifier lowKey, DeweyIdentifier highKey, BtreePushOperator results)
lowKey
- highKey
- results
-
CONTINUE_WITH_SCAN
, CONTINUE_WITH_BINSEARCH
public int continueScan(int pos, DeweyIdentifier highKey, BtreePushOperator results)
public void deleteAtPos(int i)
i
- the position the key and value is deleted at
|
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |