![JAR search and dependency download from the Maven repository](/logo.png)
org.cthul.strings.Pluralizer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cthul-strings Show documentation
Show all versions of cthul-strings Show documentation
Functions for converting strings from and to various formats,
such as roman numbers, alpha indices, Java identifiers,
and format strings.
The newest version!
package org.cthul.strings;
import org.cthul.strings.plural.PluralizerRegistry;
import org.cthul.strings.plural.RegexPluralizer;
/**
* Implements pluralization rules of a language.
*
* Implementations can extend {@link RegexPluralizer}
*
* @author Arian Treffer
* @see PluralizerRegistry
*/
public interface Pluralizer {
/**
* Converts a noun to plural.
*
* If {@code word} is plural, the result is the same.
* @param word
* @return plural of {@code word}
*/
public String pluralOf(String word);
/**
* Converts a noun to singular.
*
* If {@code word} is singular, the result is the same.
* @param word
* @return singular of {@code word}
*/
public String singularOf(String word);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy