Package xbot.common.properties
Class PropertyFactory
java.lang.Object
xbot.common.properties.PropertyFactory
A factory for creating properties. This is the preferred way to create properties.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendPrefix
(String toAppend) Appends a prefix to the current prefix for all properties created by this factory.createPersistentProperty
(String suffix, boolean defaultValue) Method for creating a double persistent property.createPersistentProperty
(String suffix, boolean defaultValue, Property.PropertyLevel level) Method for creating a double persistent property.createPersistentProperty
(String suffix, double defaultValue) Method for creating a double persistent property.createPersistentProperty
(String suffix, double defaultValue, Property.PropertyLevel level) Method for creating a double persistent property.createPersistentProperty
(String suffix, String defaultValue) Method for creating a double persistent property.createPersistentProperty
(String suffix, String defaultValue, Property.PropertyLevel level) Method for creating a double persistent property.Gets the prefix for all properties created by this factory.void
Sets the default property level.void
Sets the prefix for all properties created by this factory.void
setPrefix
(IPropertySupport prefixSource) Sets the prefix for all properties created by this factory.void
Sets the prefix for all properties created by this factory to the top level.
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log
-
-
Method Details
-
setPrefix
Sets the prefix for all properties created by this factory. This or another prefix setting method must be called before any properties are created.- Parameters:
prefix
- The prefix to use for all properties created by this factory.
-
setPrefix
Sets the prefix for all properties created by this factory. This or another prefix setting method must be called before any properties are created.- Parameters:
prefixSource
- The prefix source to use for the prefix.
-
appendPrefix
Appends a prefix to the current prefix for all properties created by this factory. This or another prefix setting method must be called before any properties are created.- Parameters:
toAppend
- The prefix to append to the current prefix.
-
setTopLevelPrefix
public void setTopLevelPrefix()Sets the prefix for all properties created by this factory to the top level. This or another prefix setting method must be called before any properties are created. -
getPrefix
Gets the prefix for all properties created by this factory.- Returns:
- The prefix for all properties created by this factory.
-
getCleanPrefix
-
setDefaultLevel
Sets the default property level.- Parameters:
level
- The property level.
-
createPersistentProperty
Method for creating a double persistent property.- Parameters:
suffix
- The suffix for the property.defaultValue
- The default value for the property.- Returns:
- The property.
-
createPersistentProperty
public BooleanProperty createPersistentProperty(String suffix, boolean defaultValue, Property.PropertyLevel level) Method for creating a double persistent property.- Parameters:
suffix
- The suffix for the property.defaultValue
- The default value for the property.level
- The property level.- Returns:
- The property.
-
createPersistentProperty
Method for creating a double persistent property.- Parameters:
suffix
- The suffix for the property.defaultValue
- The default value for the property.- Returns:
- The property.
-
createPersistentProperty
public StringProperty createPersistentProperty(String suffix, String defaultValue, Property.PropertyLevel level) Method for creating a double persistent property.- Parameters:
suffix
- The suffix for the property.defaultValue
- The default value for the property.level
- The property level.- Returns:
- The property.
-
createPersistentProperty
Method for creating a double persistent property.- Parameters:
suffix
- The suffix for the property.defaultValue
- The default value for the property.- Returns:
- The property.
-
createPersistentProperty
public DoubleProperty createPersistentProperty(String suffix, double defaultValue, Property.PropertyLevel level) Method for creating a double persistent property.- Parameters:
suffix
- The suffix for the property.defaultValue
- The default value for the property.level
- The property level.- Returns:
- The property.
-