DoubleKeyCache
public class DefaultCache extends java.lang.Object implements DoubleKeyCache
Constructor | Description |
---|---|
DefaultCache() |
|
DefaultCache(int maxSize) |
Modifier and Type | Method | Description |
---|---|---|
void |
addDoubleKey(double relatedKey,
java.lang.Object o) |
|
void |
addDoubleKey(DoubleKey d) |
|
void |
clearCache() |
|
java.lang.Object |
clone() |
|
int |
getMaxCacheSize() |
|
java.lang.Object |
getNearest(double key,
double tolerance) |
retrieves the object with the key nearest to given value
|
DoubleKey |
getNearest(DoubleKey d,
double tolerance) |
|
void |
setMaxCacheSize(int maxSize) |
public DefaultCache()
public DefaultCache(int maxSize)
public java.lang.Object getNearest(double key, double tolerance)
DoubleKeyCache
getNearest
in interface DoubleKeyCache
public DoubleKey getNearest(DoubleKey d, double tolerance)
public void addDoubleKey(double relatedKey, java.lang.Object o)
addDoubleKey
in interface DoubleKeyCache
public void addDoubleKey(DoubleKey d)
public void setMaxCacheSize(int maxSize)
public int getMaxCacheSize()
public void clearCache()
clearCache
in interface DoubleKeyCache
public java.lang.Object clone()
clone
in interface DoubleKeyCache
clone
in class java.lang.Object