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

me.datafox.dfxengine.text.api.Text Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package me.datafox.dfxengine.text.api;

import me.datafox.dfxengine.text.api.exception.TextConfigurationException;

/**
 * A {@link String} generation interface. {@link #get(TextFactory, TextConfiguration)} should use the provided
 * {@link TextConfiguration} and not {@link TextFactory#getConfiguration()}. The reference to {@link TextFactory} is
 * provided for access to objects like {@link Name Names} and {@link NumberFormatter NumberFormatters}.
 *
 * @author datafox
 */
@FunctionalInterface
public interface Text {
    /**
     * Implementation should use the provided {@link TextConfiguration} and not {@link TextFactory#getConfiguration()}.
     * The reference to {@link TextFactory} is provided for access to objects like {@link Name Names} and
     * {@link NumberFormatter NumberFormatters}.
     *
     * @param factory {@link TextFactory} for generation
     * @param configuration {@link TextConfiguration} for generation
     * @return generated {@link String}
     *
     * @throws TextConfigurationException if the {@link TextConfiguration} is not valid for this text
     */
    String get(TextFactory factory, TextConfiguration configuration);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy