public final class StyleCache extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StyleCache.RangeViolatedError |
static class |
StyleCache.StyleList
List of Styles, immutable
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.Double> |
bd |
private java.util.List<StyleCache.StyleList> |
data |
static StyleCache |
EMPTY_STYLECACHE |
private static Storage<StyleCache> |
internPool |
Modifier | Constructor and Description |
---|---|
private |
StyleCache() |
private |
StyleCache(StyleCache s) |
Modifier and Type | Method and Description |
---|---|
void |
consistencyTest() |
boolean |
equals(java.lang.Object obj) |
StyleCache.StyleList |
get(double scale)
looks up styles for a certain scale value
|
Pair<StyleCache.StyleList,Range> |
getWithRange(double scale)
looks up styles for a certain scale value and additionally returns
the scale range for the returned styles
|
int |
hashCode() |
StyleCache |
intern()
Like String.intern() (reduce memory consumption).
|
StyleCache |
put(StyleCache.StyleList sl,
double lower,
double upper)
add a new styles to the cache.
|
StyleCache |
put(StyleCache.StyleList sl,
Range r) |
private void |
putImpl(StyleCache.StyleList sl,
double lower,
double upper)
ASCII-art explanation:
data[i]
--|-------|---------|--
bd[i-1] bd[i] bd[i+1]
(--------]
lower upper
|
java.lang.String |
toString() |
private final java.util.List<java.lang.Double> bd
private final java.util.List<StyleCache.StyleList> data
private static final Storage<StyleCache> internPool
public static final StyleCache EMPTY_STYLECACHE
private StyleCache()
private StyleCache(StyleCache s)
public StyleCache.StyleList get(double scale)
public Pair<StyleCache.StyleList,Range> getWithRange(double scale)
public StyleCache put(StyleCache.StyleList sl, Range r)
public StyleCache put(StyleCache.StyleList sl, double lower, double upper)
private void putImpl(StyleCache.StyleList sl, double lower, double upper)
public void consistencyTest()
public StyleCache intern()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object