protected String makePlural ( final String name ) { String plural ; final int length = name . length ( ) ; final char lastChar = name . charAt ( length - 1 ) ; if ( lastChar != ' ' ) { plural = name + ( lastChar == ' ' || lastChar == ' ' || lastChar == ' ' || name . endsWith ( "ch" ) ? "es" : "s" ) ; } else { if ( length == 1 ) { plural = name + "s" ; } else { final char penultimateChar = name . charAt ( length - 2 ) ; plural = ( penultimateChar == ' ' || penultimateChar == ' ' || penultimateChar == ' ' || penultimateChar == ' ' || penultimateChar == ' ' ) ? name + "s" : name . substring ( 0 , length - 1 ) + "ies" ; } } return plural ; }
Returns the plural form of a name . Regular rules are used to generate the plural form .