Class ToggleInput

java.lang.Object
com.ultikits.ultitools.ui.ToggleInput
All Implemented Interfaces:
FormInput<Boolean>

public final class ToggleInput extends Object implements FormInput<Boolean>
A checkbox. Value: its state.
  • Field Details

    • key

      private final String key
    • label

      private final Text label
    • initial

      private final boolean initial
  • Constructor Details

    • ToggleInput

      private ToggleInput(String key, Text label, boolean initial)
  • Method Details

    • of

      public static ToggleInput of(String key, Text label, boolean initial)
      Creates a checkbox with a validated key.
    • key

      public String key()
      Description copied from interface: FormInput
      Unique within its form; [a-z0-9_]+, at most 32 characters.
      Specified by:
      key in interface FormInput<Boolean>
    • label

      public Text label()
      Description copied from interface: FormInput
      The deferred label.
      Specified by:
      label in interface FormInput<Boolean>
    • initial

      public boolean initial()
      The initial state.
    • equals

      public boolean equals(@Nullable @Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object