Package xbot.common.properties
Interface ITableProxy
- All Known Subinterfaces:
PermanentStorage
- All Known Implementing Classes:
DatabaseStorageBase
,MockPermanentStorage
,PreferenceStorage
,SmartDashboardTableWrapper
,TableProxy
public interface ITableProxy
This interface defines a simple table interface, where you can set and retrieve
values. All methods are strongly typed (so we have SetDouble instead of Set(object))
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears all values from the table.getBoolean
(String key) Reads a boolean property value.Reads a numeric property value.Reads a string property value.void
Removes a key from the table.void
setBoolean
(String key, boolean value) Writes a boolean property value.void
Writes a numeric property value.void
setFastMode
(boolean on) Sets the table to fast mode.void
Writes a string property value.
-
Method Details
-
setDouble
Writes a numeric property value.- Parameters:
key
- The name of the property.value
- The value to write.
-
setBoolean
Writes a boolean property value.- Parameters:
key
- The name of the property.value
- The value to write.
-
setString
Writes a string property value.- Parameters:
key
- The name of the property.value
- The value to write.
-
getDouble
Reads a numeric property value.- Parameters:
key
- The name of the property.- Returns:
- The value of the property, or null if it does not exist.
-
getBoolean
Reads a boolean property value.- Parameters:
key
- The name of the property.- Returns:
- The value of the property, or null if it does not exist.
-
getString
Reads a string property value.- Parameters:
key
- The name of the property.- Returns:
- The value of the property, or null if it does not exist.
-
clear
void clear()Clears all values from the table. -
setFastMode
void setFastMode(boolean on) Sets the table to fast mode. This is a hint to the underlying implementation that we are going to be doing a lot of reads and writes in a short period of time, and that it should optimize for that case.- Parameters:
on
- True to turn fast mode on, false to turn it off.
-
remove
Removes a key from the table.- Parameters:
key
- The name of the property to remove.
-