public class PaletteEntryForValue extends Object implements PaletteEntry
| Constructor and Description |
|---|
PaletteEntryForValue(float value,
Color color)
Constructs a palette entry for a single value.
|
| 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 PaletteEntryForValue(float value,
Color color)
This class will support color-assignments for Float.NaN.
value - the color value associated with this palette entry; a
Float.NaN is allowed.color - the color assigned to valuepublic boolean isCovered(float f)
PaletteEntryisCovered in interface PaletteEntryf - a valid floating point value, or a NaN.public int getARGB(float f)
PaletteEntrygetARGB in interface PaletteEntryf - valid floating point value, or a NaN.public Color getColor(float f)
PaletteEntrygetColor in interface PaletteEntryf - a valid floating point value, or a NaN.public boolean coversSingleEntry()
PaletteEntrycoversSingleEntry in interface PaletteEntrypublic float getLowerBound()
PaletteEntrygetLowerBound in interface PaletteEntrypublic float getUpperBound()
PaletteEntrygetUpperBound in interface PaletteEntryCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.