All Known Implementing Classes:
PaletteEntryForRange, PaletteEntryForValue

public interface PaletteEntry
Defines an interface for specifying color assignments to floating point values.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.
    getColor(float f)
    Gets the color assignment associated with the input value.
    float
    Gets the lower-bound value for the palette entry
    float
    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.
  • Method Details

    • coversSingleEntry

      Indicates that the entry covers exactly one unique value (including, potentially, Float.NaN).
      Returns:
      true if the entry covers exactly one unique value
    • getArgb

      int getArgb(float f)
      Gets 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).
      Parameters:
      f - valid floating point value, or a NaN.
      Returns:
      an integer value
    • getColor

      Color getColor(float f)
      Gets 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).
      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.
    • getLowerBound

      float getLowerBound()
      Gets the lower-bound value for the palette entry
      Returns:
      if defined, a valid floating point value; otherwise, a null.
    • getUpperBound

      float getUpperBound()
      Gets the upper-bound value for the palette entry
      Returns:
      if defined, a valid floating point value; otherwise, a null.
    • isCovered

      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.
      Parameters:
      f - a valid floating point value, or a NaN.
      Returns:
      true if the entry can assign a color to the entry; otherwise, false.