Class PreferenceManager
- java.lang.Object
-
- org.team1540.rooster.preferencemanager.PreferenceManager
-
public class PreferenceManager extends Object
Class to manage creating and updating robot preferences. Add an object containing fields marked withPreference
to have those values be controlled by what is saved in the robot'sPreferences
. The PreferenceManager also supports storing non-persistent values via theSmartDashboard
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(@NotNull Object object)
Adds an object to thePreferenceManager
.static @NotNull PreferenceManager
getInstance()
boolean
isEnabled()
void
setEnabled(boolean enabled)
-
-
-
Method Detail
-
getInstance
@Contract(pure=true) @NotNull public static @NotNull PreferenceManager getInstance()
-
add
public void add(@NotNull @NotNull Object object)
Adds an object to thePreferenceManager
.- Parameters:
object
- The object to add. One or more of the fields in this object should be marked withPreference
.- Throws:
NullPointerException
- If object is null.
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
-