Interface MutableBooleanProperty

All Superinterfaces:
BooleanProperty, Functor<Boolean>, MutableProperty<Boolean>, NonNullProperty<Boolean>, Property<Boolean>
All Known Subinterfaces:
ObservableBooleanProperty
All Known Implementing Classes:
BooleanConfigOption, DeserializedBooleanProperty, SimpleMutableBooleanProperty, SimpleObservableBooleanProperty, StoredBooleanProperty

public interface MutableBooleanProperty extends BooleanProperty, MutableProperty<Boolean>
A property with a boolean value that can be changed.
  • Method Details

    • setValue

      default boolean setValue(Boolean value)
      Description copied from interface: MutableProperty
      Sets the value of this property.
      Specified by:
      setValue in interface MutableProperty<Boolean>
      Parameters:
      value - The new value
      Returns:
      true if the value was changed.
    • swap

      default boolean swap(boolean value)
      Replaces the value with a new value and returns its previous value.
      Parameters:
      value - The new value
      Returns:
      The previous value.
    • modify

      default boolean modify(BooleanMapper mapper)
      Applies a mapper to the value of this property.
      Parameters:
      mapper - The mapper to apply
      Returns:
      true if the value was changed.
    • toggle

      default void toggle()
      Negates the value of this property.
    • set

      boolean set(boolean value)
      Sets the value of this property.
      Parameters:
      value - The new value
      Returns:
      true if the value was changed.
    • viewProperty

      default BooleanProperty viewProperty()
      Specified by:
      viewProperty in interface MutableProperty<Boolean>