Class ElemProbD<T>

java.lang.Object
io.nosqlbench.virtdata.library.basics.core.stathelpers.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 Summary

    Fields 
    Modifier and Type Field Description
    static java.util.Comparator<ElemProbD> DESCENDING_PROBABILTY  
  • Constructor Summary

    Constructors 
    Constructor Description
    ElemProbD​(T element, double probability)  
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(ElemProbD other)  
    T getElement()  
    double getProbability()  
    void setProbability​(double probability)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • ElemProbD

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

    • 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