public double max(){
  int size=values.size();
  double max=-Double.MAX_VALUE;
  for (int i=0; i < size; i++)   max=Math.max(max,values.get(i));
  return max;
}

public double max ( ) { int size = values . size ( ) ; double max = - Double . MAX_VALUE ; for ( int i = 0 ; i < size ; i ++ ) max = Math . max ( max , values . get ( i ) ) ; return max ; }
returns the maximum value of all samples .
