Interface Freezable

All Superinterfaces:
MutationBehaviourAware<Freezable>

public interface Freezable extends MutationBehaviourAware<Freezable>
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Checks if object is not frozen
    @NotNull Freezable
    Freezes object, all subsequent modifications will result in error.
    boolean
    Return true if object is currently mutable (can change publicly visible state)
  • Method Details

    • mutable

      boolean mutable()
      Description copied from interface: MutationBehaviourAware
      Return true if object is currently mutable (can change publicly visible state)
      Specified by:
      mutable in interface MutationBehaviourAware<Freezable>
      Returns:
      true if object is mutable (was not frozen)
    • freeze

      @NotNull @NotNull Freezable freeze()
      Freezes object, all subsequent modifications will result in error.
      Returns:
      This (for fluent API)
    • checkMutable

      default void checkMutable() throws IllegalStateException
      Checks if object is not frozen
      Throws:
      IllegalStateException - If object is frozen