Class AbstractActionDeviceState

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void action​(AbstractActionDevice deviceUsable, Creature person)
      The method implemented by the state pattern.
      abstract boolean isFree()
      The method determines if the device is not occupied by any person.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractActionDeviceState

        public AbstractActionDeviceState()
    • Method Detail

      • action

        public abstract void action​(AbstractActionDevice deviceUsable,
                                    Creature person)
        The method implemented by the state pattern. Depending on the state of the device, a different interaction of the device with a person is performed.
        Parameters:
        deviceUsable - Device with which a person interacts.
        person - A person who interacts with device.
      • isFree

        public abstract boolean isFree()
        The method determines if the device is not occupied by any person.
        Returns: