Package me.datafox.dfxengine.text.utils
Class TextConfigurationImpl
java.lang.Object
me.datafox.dfxengine.text.utils.TextConfigurationImpl
- All Implemented Interfaces:
TextConfiguration
Implementation of
TextConfiguration, used by NumberFormatters,
NumberSuffixFormatters, Texts and the TextFactory.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder(TextFactory factory) voidclear()Clears all entries from this configuration.<T> voidclear(ConfigurationKey<T> key) copy()<T> Tget(ConfigurationKey<T> key) getAll()<T> voidset(ConfigurationKey<T> key, ConfigurationValue<T> value) <T> voidset(ConfigurationKey<T> key, T value) voidset(TextConfiguration configuration) Applies all entries of the provided configuration to this one, overwriting any existing entries if present.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.datafox.dfxengine.text.api.TextConfiguration
getFactory
-
Constructor Details
-
TextConfigurationImpl
- Parameters:
factory-TextFactoryto be associated with this configuration
-
-
Method Details
-
set
- Specified by:
setin interfaceTextConfiguration- Type Parameters:
T- type of the object returned by theConfigurationValue- Parameters:
key-ConfigurationKeyto be usedvalue-ConfigurationValueto be used
-
set
- Specified by:
setin interfaceTextConfiguration- Type Parameters:
T- type of the object- Parameters:
key-ConfigurationKeyto be usedvalue- object to be used
-
set
Applies all entries of the provided configuration to this one, overwriting any existing entries if present.- Specified by:
setin interfaceTextConfiguration- Parameters:
configuration-TextConfigurationto be applied
-
get
- Specified by:
getin interfaceTextConfiguration- Type Parameters:
T- type of the object- Parameters:
key-ConfigurationKeyto be used- Returns:
- object associated with the key, or the default value if none is present
-
getAll
- Specified by:
getAllin interfaceTextConfiguration- Returns:
- Unmodifiable
Mapcontaining all entries of this configuration
-
clear
- Specified by:
clearin interfaceTextConfiguration- Type Parameters:
T- type of the value- Parameters:
key-ConfigurationKeyassociated with the value to be cleared
-
clear
public void clear()Clears all entries from this configuration.- Specified by:
clearin interfaceTextConfiguration
-
copy
- Specified by:
copyin interfaceTextConfiguration- Returns:
- unique configuration instance containing all entries of this configuration
-
builder
- Parameters:
factory-TextFactoryto be associated with the builder- Returns:
TextConfigurationImpl.Builderfor a configuration
-