Package io.guise.framework.input
Class AbstractInputStrategy
- java.lang.Object
-
- io.guise.framework.input.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 Summary
Constructors Constructor Description AbstractInputStrategy(InputStrategy parent)
Parent constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStrategy
getParent()
boolean
input(Input input)
Processes input, returning whether the input was consumed.
-
-
-
Constructor Detail
-
AbstractInputStrategy
public AbstractInputStrategy(InputStrategy parent)
Parent constructor.- Parameters:
parent
- The parent input strategy, ornull
if there is no parent input strategy.
-
-
Method Detail
-
getParent
public InputStrategy getParent()
- Specified by:
getParent
in interfaceInputStrategy
- 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 interfaceInputStrategy
- Parameters:
input
- The input to process.- Returns:
true
if the input was consumed and should not be processed further.
-
-