Class FreezableComponent

    • Constructor Detail

      • FreezableComponent

        protected FreezableComponent​(ComponentId id)
      • FreezableComponent

        protected FreezableComponent()
    • Method Detail

      • freeze

        public void freeze()
        Freezes this component to prevent further changes. Override this to freeze internal data structures and dependent objects. Overrides must call super. Calling freeze on an already frozen registry must have no effect.
        Specified by:
        freeze in interface Freezable
      • isFrozen

        public final boolean isFrozen()
        Returns whether this is currently frozen
        Specified by:
        isFrozen in interface Freezable
        Returns:
        true if this instance is in an immutable state, false otherwise
      • ensureNotFrozen

        protected void ensureNotFrozen()
        Throws an IllegalStateException if this is frozen