Class Median<T extends java.lang.Number & java.lang.Comparable<? super T>>
- java.lang.Object
-
- com.djrapitops.plan.utilities.analysis.Median<T>
-
- Type Parameters:
T
- aNumber
object which implementsComparable
(In general every standard Java number)
public class Median<T extends java.lang.Number & java.lang.Comparable<? super T>> extends java.lang.Object
Math utility for calculating the median from Integer values.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
calculate()
static <T extends java.lang.Number & java.lang.Comparable<? super T>>
Median<T>forList(java.util.List<T> list)
Creates a Median instance.
-
-
-
Method Detail
-
forList
public static <T extends java.lang.Number & java.lang.Comparable<? super T>> Median<T> forList(java.util.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()
-
-