extvisitor
Interface IExtVisitorCmd<R,I,P,H extends IExtVisitorHost<I,? super H>>
- Type Parameters:
R - The type of the return valueI - The type of the index valueP - The type of the input parametersH - The type of the host, restricted to being a subclass of IExtVisitorHost<I, ? super H>
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- ADataPacketAlgoCmd, AStatusAlgoCmd
public interface IExtVisitorCmd<R,I,P,H extends IExtVisitorHost<I,? super H>>
- extends java.io.Serializable
Interface that defines a command used by AExtVisitor that has specific
types for its return value, R, its index value, I, its input parameters, P,
and its host, H. The host is restricted to being a subclass of
IExtVisitorHost who takes the same index value and who accepts a visitor
that takes this same host type.
An IExtVisitorCmd is associated with every recognized case of an AExtVisitor,
including the default case.
Usage:
new IExtVisitorCmd<MyReturn, MyIndex, MyParam, MyExtVisitorHost>(){
public <T extends IExtVisitorHost<Integer, ? super MyExtVisitorHost>> MyReturn apply(MyIndex index, T host, MyParam... params) {...}
}
- Author:
- Stephen Wong (c) 2010
|
Method Summary |
|
apply(I index,
T host,
P... params)
The method that is run by AExtVisitor when the case associated with this
command is executed. |
apply
<T extends IExtVisitorHost<I,? super H>> R apply(I index,
T host,
P... params)
- The method that is run by AExtVisitor when the case associated with this
command is executed.
- Type Parameters:
T - The type of the host the is expected to call this method. T is restricted to be a subclass of IExtVisitorHost<I, ? super H>- Parameters:
index - The index value for the case for which this command is associated.host - The host for the visitorparams - Vararg input parameters
- Returns:
- The value returned by the running this command.