|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.objects.keys.KeyOperator<DoubleKey>
messif.objects.keys.DoubleKeyOperator
public class DoubleKeyOperator
Constructor Summary | |
---|---|
DoubleKeyOperator()
|
Method Summary | |
---|---|
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. |
Methods inherited from class messif.objects.keys.KeyOperator |
---|
intersect, isInBetween, isInBetweenEQ, isInBetweenEQH, isInBetweenEQL, max, min |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public DoubleKeyOperator()
Method Detail |
---|
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 bound
public KeyInterval<DoubleKey> makeLeftOpen(KeyInterval<DoubleKey> interval)
KeyOperator
makeLeftOpen
in class KeyOperator<DoubleKey>
interval
- the closed interval
public DoubleKey getDifference(DoubleKey first, DoubleKey second)
getDifference
in class KeyOperator<DoubleKey>
first
- the first keysecond
- the second
public DoubleKey getMiddleKey(DoubleKey first, DoubleKey second)
KeyOperator
getMiddleKey
in class KeyOperator<DoubleKey>
first
- the first keysecond
- the second
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |