public static String quantityplnoun(final int quantity,final String noun,final String one){
  final String word=plnoun(quantity,noun);
  if (quantity == 1) {
    if (one.equals("a")) {
      return a_noun(word);
    }
 else     if (one.equals("A")) {
      return A_noun(word);
    }
 else     if (one.equals("")) {
      return word;
    }
 else {
      return one + " " + word;
    }
  }
 else {
    return Integer.toString(quantity) + " " + plural(noun);
  }
}

public static String quantityplnoun ( final int quantity , final String noun , final String one ) { final String word = plnoun ( quantity , noun ) ; if ( quantity == 1 ) { if ( one . equals ( "a" ) ) { return a_noun ( word ) ; } else if ( one . equals ( "A" ) ) { return A_noun ( word ) ; } else if ( one . equals ( "" ) ) { return word ; } else { return one + " " + word ; } } else { return Integer . toString ( quantity ) + " " + plural ( noun ) ; } }
returns either the plural or singular form of the given noun , depending on the quantity ; also prefixes the quantity . in case the quantity is exactly 1 , the specified prefix is used . note : there is some additional magic to convert " a " and " a " to " an " and " an " in case that is required by the noun .
