Class ToggleOption
- All Implemented Interfaces:
Serializable<Boolean>
-
Field Summary
Fields inherited from class Option
description, name, owner -
Constructor Summary
ConstructorsConstructorDescriptionToggleOption(BaseModule owner, String name, String description) Creates a new toggle option with a default value of falseToggleOption(BaseModule owner, String name, String description, boolean value) Creates a new toggle option with a specified default valueToggleOption(BaseModule owner, String name, String description, boolean value, Option<?> parent) Creates a new toggle option with a specified default value and parentToggleOption(BaseModule owner, String name, String description, boolean value, BooleanSupplier visibility) Creates a new toggle option with visibilityToggleOption(BaseModule owner, String name, String description, boolean value, BooleanSupplier visibility, Option<?> parent) Creates a new toggle option with visibility and parent -
Method Summary
Methods inherited from class Option
getFullName, getParent, isParent, isVisible, setParent, setVisibility
-
Constructor Details
-
ToggleOption
Creates a new toggle option with a default value of false- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this option
-
ToggleOption
Creates a new toggle option with a specified default value- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this optionvalue- The initial value
-
ToggleOption
public ToggleOption(BaseModule owner, String name, String description, boolean value, Option<?> parent) Creates a new toggle option with a specified default value and parent- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this optionvalue- The initial valueparent- The parent option, or null if this is a root option
-
ToggleOption
public ToggleOption(BaseModule owner, String name, String description, boolean value, BooleanSupplier visibility) Creates a new toggle option with visibility- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this optionvalue- The initial valuevisibility- The visibility supplier for this option
-
ToggleOption
public ToggleOption(BaseModule owner, String name, String description, boolean value, BooleanSupplier visibility, Option<?> parent) Creates a new toggle option with visibility and parent- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this optionvalue- The initial valuevisibility- The visibility supplier for this optionparent- The parent option, or null if this is a root option
-
-
Method Details
-
getValue
-
setValue
-
reset
-
toJson
public com.google.gson.JsonObject toJson()- Returns:
- The object as a JsonObject
-
fromJson
- Parameters:
object- The JsonObject to deserialize- Returns:
- The deserialized object
-