Class ElemProbD<T>

  • All Implemented Interfaces:
    java.lang.Comparable<ElemProbD<T>>

    public class ElemProbD<T>
    extends java.lang.Object
    implements java.lang.Comparable<ElemProbD<T>>
    A simple wrapper type for "Event Probability", where the event is identified by a unique int, and the probability is represented with double precision floating-point.
    • Field Detail

      • DESCENDING_PROBABILTY

        public static java.util.Comparator<ElemProbD> DESCENDING_PROBABILTY
    • Constructor Detail

      • ElemProbD

        public ElemProbD​(T element,
                         double probability)
    • Method Detail

      • getProbability

        public double getProbability()
      • getElement

        public T getElement()
      • compareTo

        public int compareTo​(ElemProbD other)
        Specified by:
        compareTo in interface java.lang.Comparable<T>
      • setProbability

        public void setProbability​(double probability)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object