Package toxi.color

Class HistEntry

java.lang.Object
toxi.color.HistEntry
All Implemented Interfaces:
Comparable<HistEntry>

public class HistEntry extends Object implements Comparable<HistEntry>
This class constitutes a single histogram entry, a coupling of color & frequency. Also implements a comparator to sort histogram entries based on frequency.
  • Constructor Details

    • HistEntry

      public HistEntry(TColor c)
  • Method Details

    • compareTo

      public int compareTo(HistEntry e)
      Comparator implementation used to sort entries by frequency (descending order).
      Specified by:
      compareTo in interface Comparable<HistEntry>
    • getColor

      public TColor getColor()
      Returns the color of this histogram entry.
      Returns:
      color
    • getFrequency

      public float getFrequency()
      Returns the normalized frequency associated with this entry. Values will always be within the 0.0 ... 1.0 range.
      Returns:
      frequency