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

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

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

/**
 * A value used by {@link TextFactory} for configuration. {@link #get(TextFactory, TextConfiguration)} will be called
 * every time the configuration value is requested. Implementations should be careful when using the provided
 * {@link TextConfiguration} to avoid cyclic method calls.
 *
 * @author datafox
 */
@FunctionalInterface
public interface ConfigurationValue {
    /**
     * When writing implementations, the developer should be careful when using the provided {@link TextConfiguration}
     * to avoid cyclic method calls
     *
     * @param factory {@link TextFactory} for generating the configuration value
     * @param configuration {@link TextConfiguration} for generating the configuration value
     * @return configured value, or {@code null} if the value cannot be generated
     */
    T get(TextFactory factory, TextConfiguration configuration);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy