me.datafox.dfxengine.text.api.TextConfiguration Maven / Gradle / Ivy
package me.datafox.dfxengine.text.api;
import java.util.Map;
/**
* Configuration used by {@link NumberFormatter NumberFormatters}, {@link NumberSuffixFormatter NumberSuffixFormatters},
* {@link Text Texts} and the {@link TextFactory}.
*
* @author datafox
*/
public interface TextConfiguration {
/**
* @return {@link TextFactory} associated with this configuration
*/
TextFactory getFactory();
/**
* @param key {@link ConfigurationKey} to be used
* @param value {@link ConfigurationValue} to be used
* @param type of the object returned by the {@link ConfigurationValue}
*/
void set(ConfigurationKey key, ConfigurationValue value);
/**
* @param key {@link ConfigurationKey} to be used
* @param value object to be used
* @param type of the object
*/
void set(ConfigurationKey key, T value);
/**
* Applies all entries of the provided configuration to this one, overwriting any existing entries if present.
*
* @param configuration {@link TextConfiguration} to be applied
*/
void set(TextConfiguration configuration);
/**
* @param key {@link ConfigurationKey} to be used
* @return object associated with the key, or the default value if none is present
* @param type of the object
*/
T get(ConfigurationKey key);
/**
* @return Unmodifiable {@link Map} containing all entries of this configuration
*/
Map, ConfigurationValue>> getAll();
/**
* @param key {@link ConfigurationKey} associated with the value to be cleared
* @param type of the value
*/
void clear(ConfigurationKey key);
/**
* Clears all entries from this configuration.
*/
void clear();
/**
* @return unique configuration instance containing all entries of this configuration
*/
TextConfiguration copy();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy