public class PaletteEntryForRange extends Object implements PaletteEntry
In keeping with the conventions of many Geographic Information Systems (GIS) and art applications, this instance "covered" values in the range v0 ≤ f < v1. Thus, a value that exactly matches the upper bound of the range is not considered "covered".
Constructor and Description |
---|
PaletteEntryForRange(float v0,
float v1,
Color color)
Constructs a palette entry for the range of values v0 ≤ f < v1.
|
PaletteEntryForRange(float v0,
float v1,
Color color0,
Color color1)
Constructs a palette entry for the range of values v0 ≤ f < v1.
|
Modifier and Type | Method and Description |
---|---|
boolean |
coversSingleEntry()
Indicates that the entry covers exactly one unique value (including,
potentially, Float.NaN).
|
int |
getARGB(float f)
Gets the integer ARGB color assignment associated with the input value.
|
Color |
getColor(float f)
Gets the color assignment associated with the input value.
|
float |
getLowerBound()
Gets the lower-bound value for the palette entry
|
float |
getUpperBound()
Gets the upper-bound value for the palette entry
|
boolean |
isCovered(float f)
Indicates whether the indicated floating-point value is within the range
covered by this palette entry and can be assigned a valid color by the
implementation.
|
String |
toString() |
public PaletteEntryForRange(float v0, float v1, Color color0, Color color1)
v0
- the lower bounds (inclusive) of the covered range of valuesv1
- the upper bounds (non-inclusive) of the covered range of valuecolor0
- the color assigned to value v0color1
- the color assigned to value v1public PaletteEntryForRange(float v0, float v1, Color color)
v0
- the lower bounds (inclusive) of the covered range of valuesv1
- the upper bounds (non-inclusive) of the covered range of valuecolor
- the color assigned to value v0public boolean isCovered(float f)
PaletteEntry
isCovered
in interface PaletteEntry
f
- a valid floating point value, or a NaN.public int getARGB(float f)
PaletteEntry
getARGB
in interface PaletteEntry
f
- valid floating point value, or a NaN.public Color getColor(float f)
PaletteEntry
getColor
in interface PaletteEntry
f
- a valid floating point value, or a NaN.public boolean coversSingleEntry()
PaletteEntry
coversSingleEntry
in interface PaletteEntry
public float getLowerBound()
PaletteEntry
getLowerBound
in interface PaletteEntry
public float getUpperBound()
PaletteEntry
getUpperBound
in interface PaletteEntry
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.