Class Property

java.lang.Object
xbot.common.properties.Property
All Implemented Interfaces:
DataFrameRefreshable
Direct Known Subclasses:
BooleanProperty, DoubleProperty, StringProperty

public abstract class Property extends Object implements DataFrameRefreshable
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.
  • Field Details

    • key

      public final String key
      The key for the property.
    • prefix

      public final String prefix
    • suffix

      public final String suffix
    • level

      public final Property.PropertyLevel level
    • activeStore

      protected final ITableProxy 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

      public Property(String prefix, String key, XPropertyManager manager)
      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

      public Property.PropertyLevel 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.