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)
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.