All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cthul.strings.Pluralizer Maven / Gradle / Ivy

Go to download

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