Package xbot.common.properties
Class Property
java.lang.Object
xbot.common.properties.Property
- All Implemented Interfaces:
DataFrameRefreshable
- Direct Known Subclasses:
BooleanProperty
,DoubleProperty
,StringProperty
There are many values on the robot that we want to configure on the fly as
well as persist once we're happy with the result. We call these Properties.
They can be read/written to rapidly using a RandomAccessStore, and know how
to save themselves to PermanentStorage when a save is necessary.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
Enum to determine property persistence Ephemeral properties will not be saved or loaded from a persistent storage. -
Field Summary
Modifier and TypeFieldDescriptionprotected final ITableProxy
final String
The key for the property.final Property.PropertyLevel
protected org.apache.logging.log4j.Logger
final String
final String
-
Constructor Summary
ConstructorDescriptionProperty
(String prefix, String key, XPropertyManager manager) Creates a new property.Property
(String prefix, String suffix, XPropertyManager manager, Property.PropertyLevel level) Creates a new property. -
Method Summary
Modifier and TypeMethodDescriptiongetLevel()
abstract boolean
Checks if the property's current value matches the default.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xbot.common.advantage.DataFrameRefreshable
refreshDataFrame
-
Field Details
-
key
The key for the property. -
prefix
-
suffix
-
level
-
activeStore
-
log
protected org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
Property
public Property(String prefix, String suffix, XPropertyManager manager, Property.PropertyLevel level) Creates a new property.- Parameters:
prefix
- The property prefix. This should be unique unless you really know what you're doing.suffix
- The property suffix. This should be unique unless you really know what you're doing.manager
- The property manager.level
- The property level.
-
Property
Creates a new property.- Parameters:
prefix
- The property prefix. This should be unique unless you really know what you're doing.key
- The property key. This should be unique unless you really know what you're doing.manager
- The property manager.
-
-
Method Details
-
getLevel
-
isSetToDefault
public abstract boolean isSetToDefault()Checks if the property's current value matches the default.- Returns:
- True if the current value is the default.
-