protected static boolean approxUnit(final StringBuilder sbuf,final int amount,final int size,final String name){
  int count=amount / size;
  int remainder;
  if (count == 0) {
    return false;
  }
  remainder=amount - (count * size);
  if (remainder >= (size * 95 / 100)) {
    count++;
    sbuf.append(count);
  }
 else   if (remainder >= (size * 3 / 4)) {
    count++;
    sbuf.append("just under ");
    sbuf.append(count);
  }
 else   if (remainder >= (size * 1 / 4)) {
    sbuf.append("about ");
    sbuf.append(count);
    sbuf.append(" and a half");
    count=2;
  }
 else   if (remainder >= (size * 5 / 100)) {
    sbuf.append("just over ");
    sbuf.append(count);
  }
 else {
    sbuf.append(count);
  }
  sbuf.append(' ');
  sbuf.append(Grammar.plnoun(count,name));
  return true;
}

protected static boolean approxUnit ( final StringBuilder sbuf , final int amount , final int size , final String name ) { int count = amount / size ; int remainder ; if ( count == 0 ) { return false ; } remainder = amount - ( count * size ) ; if ( remainder >= ( size * 95 / 100 ) ) { count ++ ; sbuf . append ( count ) ; } else if ( remainder >= ( size * 3 / 4 ) ) { count ++ ; sbuf . append ( "just under " ) ; sbuf . append ( count ) ; } else if ( remainder >= ( size * 1 / 4 ) ) { sbuf . append ( "about " ) ; sbuf . append ( count ) ; sbuf . append ( " and a half" ) ; count = 2 ; } else if ( remainder >= ( size * 5 / 100 ) ) { sbuf . append ( "just over " ) ; sbuf . append ( count ) ; } else { sbuf . append ( count ) ; } sbuf . append ( ' ' ) ; sbuf . append ( Grammar . plnoun ( count , name ) ) ; return true ; }
for a given amount and unit size , generate the approximate value .
