Class PaletteEntryForValue
java.lang.Object
org.apache.commons.imaging.formats.tiff.photometricinterpreters.floatingpoint.PaletteEntryForValue
- All Implemented Interfaces:
- PaletteEntry
Provides a palette entry for a color assignment to a single value. This class will assign a color to a value only if it is an exact match for the input. This
 class will also support Float.NaN
- 
Constructor SummaryConstructorsConstructorDescriptionPaletteEntryForValue(float value, Color color) Constructs a palette entry for a single value.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanIndicates that the entry covers exactly one unique value (including, potentially, Float.NaN).intgetArgb(float f) Gets the integer ARGB color assignment associated with the input value.getColor(float f) Gets the color assignment associated with the input value.floatGets the lower-bound value for the palette entryfloatGets the upper-bound value for the palette entrybooleanisCovered(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.toString()
- 
Constructor Details- 
PaletteEntryForValueConstructs a palette entry for a single value.This class will support color-assignments for Float.NaN. - Parameters:
- value- the color value associated with this palette entry; a Float.NaN is allowed.
- color- the color assigned to value
 
 
- 
- 
Method Details- 
coversSingleEntryDescription copied from interface:PaletteEntryIndicates that the entry covers exactly one unique value (including, potentially, Float.NaN).- Specified by:
- coversSingleEntryin interface- PaletteEntry
- Returns:
- true if the entry covers exactly one unique value
 
- 
getArgbDescription copied from interface:PaletteEntryGets the integer ARGB color assignment associated with the input value. If the input value is not within the covered range of this instance, the return value is undefined (though the value zero is often used).- Specified by:
- getArgbin interface- PaletteEntry
- Parameters:
- f- valid floating point value, or a NaN.
- Returns:
- an integer value
 
- 
getColorDescription copied from interface:PaletteEntryGets the color assignment associated with the input value. If the input value is not within the covered range of this instance, the return value is undefined (though a null return is often used).- Specified by:
- getColorin interface- PaletteEntry
- Parameters:
- f- a valid floating point value, or a NaN.
- Returns:
- a valid color instance or, potentially, a null if the floating point input is not within the covered range.
 
- 
getLowerBoundDescription copied from interface:PaletteEntryGets the lower-bound value for the palette entry- Specified by:
- getLowerBoundin interface- PaletteEntry
- Returns:
- if defined, a valid floating point value; otherwise, a null.
 
- 
getUpperBoundDescription copied from interface:PaletteEntryGets the upper-bound value for the palette entry- Specified by:
- getUpperBoundin interface- PaletteEntry
- Returns:
- if defined, a valid floating point value; otherwise, a null.
 
- 
isCoveredDescription copied from interface:PaletteEntryIndicates 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.- Specified by:
- isCoveredin interface- PaletteEntry
- Parameters:
- f- a valid floating point value, or a NaN.
- Returns:
- true if the entry can assign a color to the entry; otherwise, false.
 
- 
toString
 
-