Class Median<T extends Number & Comparable<? super T>>

java.lang.Object
com.djrapitops.plan.utilities.analysis.Median<T>
Type Parameters:
T - a Number object which implements Comparable (In general every standard Java number)

public class Median<T extends Number & Comparable<? super T>> extends Object
Math utility for calculating the median from Integer values.
  • Method Details

    • forList

      public static <T extends Number & Comparable<? super T>> Median<T> forList(List<T> list)
      Creates a Median instance.
      Type Parameters:
      T - Type of the number calculating median for
      Parameters:
      list - the input list
      Returns:
      an instance of Median for the List given
    • calculate

      public double calculate()