public class DoubleKeyOperator extends KeyOperator<DoubleKey> implements java.io.Serializable
Constructor and Description |
---|
DoubleKeyOperator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(DoubleKey o1,
DoubleKey o2) |
KeyInterval<DoubleKey> |
createInteral(DoubleKey from,
DoubleKey to)
This method creates an interval given two keys.
|
DoubleKey |
getDifference(DoubleKey first,
DoubleKey second)
Given two keys, return their distance (difference)
|
DoubleKey |
getMaxKey()
Returns the maximal value of given key type.
|
DoubleKey |
getMiddleKey(DoubleKey first,
DoubleKey second)
Given two keys, return the key in the middle.
|
DoubleKey |
getMinKey()
Returns the minimal value of given key type.
|
DoubleKey |
getNextKey(DoubleKey key)
Given a key, return the smallest key which is greater than the key specified.
|
DoubleKey |
getPreviousKey(DoubleKey key)
Given a key, return the greatest key which is smaller than the key specified.
|
KeyInterval<DoubleKey> |
makeLeftOpen(KeyInterval<DoubleKey> interval)
This method returns a new instance of KeyInterval which makes this interval opened from the left.
|
intersect, isInBetween, isInBetweenEQ, isInBetweenEQH, isInBetweenEQL, max, min
public int compare(DoubleKey o1, DoubleKey o2)
compare
in interface java.util.Comparator<DoubleKey>
public DoubleKey getMaxKey()
KeyOperator
getMaxKey
in class KeyOperator<DoubleKey>
public DoubleKey getMinKey()
KeyOperator
getMinKey
in class KeyOperator<DoubleKey>
public DoubleKey getNextKey(DoubleKey key)
KeyOperator
getNextKey
in class KeyOperator<DoubleKey>
key
public DoubleKey getPreviousKey(DoubleKey key)
KeyOperator
getPreviousKey
in class KeyOperator<DoubleKey>
key
public KeyInterval<DoubleKey> createInteral(DoubleKey from, DoubleKey to)
KeyOperator
createInteral
in class KeyOperator<DoubleKey>
from
- the lower boundto
- the upper boundpublic KeyInterval<DoubleKey> makeLeftOpen(KeyInterval<DoubleKey> interval)
KeyOperator
makeLeftOpen
in class KeyOperator<DoubleKey>
interval
- the closed intervalpublic DoubleKey getDifference(DoubleKey first, DoubleKey second)
getDifference
in class KeyOperator<DoubleKey>
first
- the first keysecond
- the secondpublic DoubleKey getMiddleKey(DoubleKey first, DoubleKey second)
KeyOperator
getMiddleKey
in class KeyOperator<DoubleKey>
first
- the first keysecond
- the second