pt.ist.fenixframework.core.adt.bplustree
Class DoubleArray<T extends AbstractDomainObject>
java.lang.Object
pt.ist.fenixframework.core.adt.bplustree.DoubleArray<T>
- All Implemented Interfaces:
- Serializable
public class DoubleArray<T extends AbstractDomainObject>
- extends Object
- implements Serializable
- See Also:
- Serialized Form
Method Summary |
DoubleArray<T> |
addKeyValue(Comparable keyToInsert,
T valToInsert)
|
DoubleArray<T> |
addKeyValue(DoubleArray.KeyVal keyVal)
|
boolean |
containsKey(Comparable key)
|
DoubleArray<T> |
duplicateAndAddKey(Comparable midKey,
T left,
T right)
|
Comparable |
findRightMiddlePosition()
|
Comparable |
firstKey()
|
T |
firstValue()
|
T |
get(Comparable key)
|
DoubleArray.KeyVal |
getBiggestKeyValue()
|
DoubleArray.KeyVal |
getSmallestKeyValue()
|
T |
lastValue()
|
DoubleArray<T> |
leftPart(int splitIndex)
|
DoubleArray<T> |
leftPart(int splitIndex,
int extraSlots)
|
int |
length()
|
Comparable |
lowerKeyThanHighest()
|
DoubleArray<T> |
mergeWith(Comparable splitKey,
DoubleArray<T> left)
|
DoubleArray<T> |
mergeWith(DoubleArray<T> other)
|
void |
quicksort(Comparable[] main,
T[] index)
|
void |
quicksort(Comparable[] a,
T[] index,
int left,
int right)
|
DoubleArray<T> |
removeBiggestKeyValue()
|
DoubleArray<T> |
removeKey(Comparable key)
|
DoubleArray<T> |
removeSmallestKeyValue()
|
DoubleArray<T> |
replaceKey(Comparable deletedKey,
Comparable replacementKey,
T subNode)
|
DoubleArray<T> |
rightPart(int splitIndex)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keys
public Comparable[] keys
values
public T extends AbstractDomainObject[] values
valuesClazz
protected Class<T extends AbstractDomainObject> valuesClazz
DoubleArray
public DoubleArray(Class<T> valuesClazz)
DoubleArray
public DoubleArray(Class<T> valuesClazz,
Comparable key,
T value,
T lastValue)
DoubleArray
public DoubleArray(Class<T> valuesClazz,
Comparable[] keys,
T[] values)
length
public int length()
duplicateAndAddKey
public DoubleArray<T> duplicateAndAddKey(Comparable midKey,
T left,
T right)
get
public T get(Comparable key)
containsKey
public boolean containsKey(Comparable key)
replaceKey
public DoubleArray<T> replaceKey(Comparable deletedKey,
Comparable replacementKey,
T subNode)
firstValue
public T firstValue()
firstKey
public Comparable firstKey()
lastValue
public T lastValue()
mergeWith
public DoubleArray<T> mergeWith(Comparable splitKey,
DoubleArray<T> left)
mergeWith
public DoubleArray<T> mergeWith(DoubleArray<T> other)
quicksort
public void quicksort(Comparable[] main,
T[] index)
quicksort
public void quicksort(Comparable[] a,
T[] index,
int left,
int right)
getSmallestKeyValue
public DoubleArray.KeyVal getSmallestKeyValue()
getBiggestKeyValue
public DoubleArray.KeyVal getBiggestKeyValue()
removeSmallestKeyValue
public DoubleArray<T> removeSmallestKeyValue()
removeBiggestKeyValue
public DoubleArray<T> removeBiggestKeyValue()
removeKey
public DoubleArray<T> removeKey(Comparable key)
addKeyValue
public DoubleArray<T> addKeyValue(DoubleArray.KeyVal keyVal)
addKeyValue
public DoubleArray<T> addKeyValue(Comparable keyToInsert,
T valToInsert)
lowerKeyThanHighest
public Comparable lowerKeyThanHighest()
findRightMiddlePosition
public Comparable findRightMiddlePosition()
leftPart
public DoubleArray<T> leftPart(int splitIndex)
leftPart
public DoubleArray<T> leftPart(int splitIndex,
int extraSlots)
rightPart
public DoubleArray<T> rightPart(int splitIndex)
Copyright © 2013. All Rights Reserved.