T - the type of the data objectspublic class DividedScale<T> extends Object
StyleElementList, StyleElement and its subclasses).| Modifier and Type | Class and Description |
|---|---|
static class |
DividedScale.RangeViolatedError |
| Modifier and Type | Field and Description |
|---|---|
private List<Double> |
bd |
private List<T> |
data |
| Modifier | Constructor and Description |
|---|---|
protected |
DividedScale() |
protected |
DividedScale(DividedScale<T> s) |
| Modifier and Type | Method and Description |
|---|---|
void |
consistencyTest() |
boolean |
equals(Object obj) |
T |
get(double scale)
Looks up the data object for a certain scale value.
|
Pair<T,Range> |
getWithRange(double scale)
Looks up the data object for a certain scale value and additionally returns
the scale range where the object is valid.
|
int |
hashCode() |
DividedScale<T> |
put(T o,
Range r)
Add data object which is valid for the given range.
|
protected void |
putImpl(T o,
double lower,
double upper)
Implementation of the
put operation. |
String |
toString() |
protected DividedScale()
protected DividedScale(DividedScale<T> s)
public T get(double scale)
scale - scalepublic Pair<T,Range> getWithRange(double scale)
scale - scalepublic DividedScale<T> put(T o, Range r)
o - data objectr - the valid rangeDividedScale objectprotected void putImpl(T o, double lower, double upper)
put operation.
ASCII-art explanation:
data[i]
--|-------|---------|--
bd[i-1] bd[i] bd[i+1]
(--------]
lower uppero - data objectlower - lower boundupper - upper boundpublic void consistencyTest()