Class Toggle

java.lang.Object
org.moeaframework.util.mvc.Setting<Boolean>
org.moeaframework.util.mvc.Toggle

public class Toggle extends Setting<Boolean>
A setting representing a binary state (on/off, true/false, enabled/disabled).
  • Constructor Details

    • Toggle

      public Toggle(boolean defaultValue)
      Constructs a toggle setting with the default value.
      Parameters:
      defaultValue - the default value
  • Method Details

    • flip

      public void flip()
      Flips the value of this toggle.