public static boolean isSingleValued(Iterable<Number> docToValueCount){
  for (  Number count : docToValueCount) {
    if (count.longValue() > 1) {
      return false;
    }
  }
  return true;
}

public static boolean isSingleValued ( Iterable < Number > docToValueCount ) { for ( Number count : docToValueCount ) { if ( count . longValue ( ) > 1 ) { return false ; } } return true ; }
helper : returns true if the given doctovalue count contains only at most one value
