Class AbstractInputStrategy

java.lang.Object
io.guise.framework.input.AbstractInputStrategy
All Implemented Interfaces:
InputStrategy
Direct Known Subclasses:
BindingInputStrategy

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

    • AbstractInputStrategy

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

    • 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.