T
- a Number
object which implements Comparable
(In general every standard Java number)public class Median<T extends java.lang.Number & java.lang.Comparable<? super T>>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
double |
calculate() |
static <T extends java.lang.Number & java.lang.Comparable<? super T>> |
forList(java.util.List<T> list)
Creates a Median instance
|
public static <T extends java.lang.Number & java.lang.Comparable<? super T>> Median<T> forList(java.util.List<T> list)
list
- the input listMedian
for the List givenpublic double calculate()