com.guiseframework.input
Class AbstractInputStrategy

java.lang.Object
  extended by com.guiseframework.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
AbstractInputStrategy(InputStrategy parent)
          Parent constructor.
 
Method Summary
 InputStrategy getParent()
           
 boolean input(Input input)
          Processes input, returning whether the input was consumed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.
Throws:
java.lang.NullPointerException - if the given input is null.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.