Class AbstractInputStrategy

  • All Implemented Interfaces:
    InputStrategy
    Direct Known Subclasses:
    BindingInputStrategy

    public class AbstractInputStrategy
    extends java.lang.Object
    implements InputStrategy
    An abstract implementation of a strategy for processing input.
    Author:
    Garret Wilson
    • Constructor Detail

      • AbstractInputStrategy

        public AbstractInputStrategy​(InputStrategy parent)
        Parent constructor.
        Parameters:
        parent - The parent input strategy, or null if there is no parent input strategy.
    • Method Detail

      • getParent

        public InputStrategy getParent()
        Specified by:
        getParent in interface InputStrategy
        Returns:
        The parent input strategy, or null if there is no parent input strategy.
      • input

        public boolean input​(Input input)
        Processes input, returning whether the input was consumed. If the input is not consumed by this input strategy, it is sent to the parent input strategy, if any, for processing.

        This version does nothing besides delegate to the parent input strategy.

        Specified by:
        input in interface InputStrategy
        Parameters:
        input - The input to process.
        Returns:
        true if the input was consumed and should not be processed further.