@Test public void testPluralize() { assertThat(Inflector.getInstance().pluralize("mattress"), is("mattresses")); assertThat(Inflector.getInstance().pluralize("address"), is("addresses")); }
public String pluralize(String word) { if (uncountables.contains(word.toLowerCase())) { return word; } return replaceWithFirstRule(word, plurals); }
Inflector { public String pluralize(String word) { if (uncountables.contains(word.toLowerCase())) { return word; } return replaceWithFirstRule(word, plurals); } }
Inflector { public String pluralize(String word) { if (uncountables.contains(word.toLowerCase())) { return word; } return replaceWithFirstRule(word, plurals); } private  Inflector(Builder builder); }
Inflector { public String pluralize(String word) { if (uncountables.contains(word.toLowerCase())) { return word; } return replaceWithFirstRule(word, plurals); } private  Inflector(Builder builder); static Inflector.Builder createDefaultBuilder(); static Inflector getInstance(); String pluralize(String word); String singularize(String word); static Builder builder(); }
Inflector { public String pluralize(String word) { if (uncountables.contains(word.toLowerCase())) { return word; } return replaceWithFirstRule(word, plurals); } private  Inflector(Builder builder); static Inflector.Builder createDefaultBuilder(); static Inflector getInstance(); String pluralize(String word); String singularize(String word); static Builder builder();  }