public class DefaultCache extends java.lang.Object implements DoubleKeyCache
| Constructor and Description |
|---|
DefaultCache() |
DefaultCache(int maxSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDoubleKey(DoubleKey d) |
void |
addDoubleKey(double relatedKey,
java.lang.Object o) |
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 java.lang.Object getNearest(double key,
double tolerance)
DoubleKeyCachegetNearest in interface DoubleKeyCachepublic DoubleKey getNearest(DoubleKey d, double tolerance)
public void addDoubleKey(double relatedKey,
java.lang.Object o)
addDoubleKey in interface DoubleKeyCachepublic void addDoubleKey(DoubleKey d)
public void setMaxCacheSize(int maxSize)
public int getMaxCacheSize()
public void clearCache()
clearCache in interface DoubleKeyCachepublic java.lang.Object clone()
clone in interface DoubleKeyCacheclone in class java.lang.Object