public static boolean isUnitInterval(String value){
  if (!isNumeric(value)) {
    return false;
  }
  Double dbl=Double.parseDouble(value);
  return dbl >= 0d && dbl <= 1d;
}

public static boolean isUnitInterval ( String value ) { if ( ! isNumeric ( value ) ) { return false ; } Double dbl = Double . parseDouble ( value ) ; return dbl >= 0d && dbl <= 1d ; }
returns true if the provided string argument is to be considered a unit interval , which implies that the value is numeric and inclusive between 0 and 1 .
