/** * <p> * Converts a noun to its plural form for the given number of instances * using the given {@link Pluralizer}. * </p> * <p> * The return value is not defined if this method is passed a plural form. * </p> * @param word a singular form * @param number the number of objects being referred to in the plural * @param pluralizer a noun pluralizer * @return the plural form */ public static String pluralOf(String word, int number, Pluralizer pluralizer) { return pluralizer == null ? null : pluralizer.pluralize(word, number); }
/** * <p> * Converts a noun to its plural form using the given {@link Pluralizer}. * </p> * <p> * The return value is not defined if this method is passed a plural form. * </p> * @param word a singular form * @param pluralizer a noun pluralizer * @return the plural form */ public static String pluralOf(String word, Pluralizer pluralizer) { return pluralizer == null ? null : pluralizer.pluralize(word); }
/** * <p> * Converts a noun to its plural form using the given {@link Pluralizer}. * </p> * <p> * The return value is not defined if this method is passed a plural form. * </p> * @param word a singular form * @param pluralizer a noun pluralizer * @return the plural form */ public static String pluralOf(String word, Pluralizer pluralizer) { return pluralizer == null ? null : pluralizer.pluralize(word); }
/** * <p> * Converts a noun to its plural form for the given number of instances * using the given {@link Pluralizer}. * </p> * <p> * The return value is not defined if this method is passed a plural form. * </p> * @param word a singular form * @param number the number of objects being referred to in the plural * @param pluralizer a noun pluralizer * @return the plural form */ public static String pluralOf(String word, int number, Pluralizer pluralizer) { return pluralizer == null ? null : pluralizer.pluralize(word, number); }
String plural = pluralizeInternal(trimmedWord); if (plural == null) { return fallbackPluralizer.pluralize(word, number);
String plural = pluralizeInternal(trimmedWord); if (plural == null) { return fallbackPluralizer.pluralize(word, number);