Class PreferenceManager


  • public class PreferenceManager
    extends Object
    Class to manage creating and updating robot preferences. Add an object containing fields marked with Preference to have those values be controlled by what is saved in the robot's Preferences. The PreferenceManager also supports storing non-persistent values via the SmartDashboard.
    • Method Detail

      • getInstance

        @Contract(pure=true)
        @NotNull
        public static @NotNull PreferenceManager getInstance()
      • add

        public void add​(@NotNull
                        @NotNull Object object)
        Adds an object to the PreferenceManager.
        Parameters:
        object - The object to add. One or more of the fields in this object should be marked with Preference.
        Throws:
        NullPointerException - If object is null.
      • isEnabled

        public boolean isEnabled()
      • setEnabled

        public void setEnabled​(boolean enabled)