listFW
Interface IList<E>
- All Known Subinterfaces:
- IMTList<E>, INEList<E>
public interface IList<E>
Defines an immutable list that holds elements of type E.
Serves as a host for an algorithm on a list to visit its internal structure.
Has a "hook" method to call on the appropriate method of the visitor, making
the immutable list structure a framework.
- Since:
- Copyright 2004 - DXN, SBW All rights reserved
|
Method Summary |
|
execute(IListAlgo<? super E,R,P> algo,
P... inp)
A visitor pattern "hook" method that executes an IListAlgo. |
execute
<R,P> R execute(IListAlgo<? super E,R,P> algo,
P... inp)
- A visitor pattern "hook" method that executes an
IListAlgo.
- Parameters:
algo - the visitor, the algorithm to be executed.
Any visitor that works on a super type of E is accepted.inp - a generic input parameter to be used by the algorithm algo.
- Returns:
Object output from executing the algorithm algo.