Package ca.odell.glazedlists
Interface FunctionList.AdvancedFunction<A,B>
-
- All Superinterfaces:
FunctionList.Function<A,B>
- Enclosing class:
- FunctionList<S,E>
public static interface FunctionList.AdvancedFunction<A,B> extends FunctionList.Function<A,B>
An AdvancedFunction is an extension of the simple Function interface which provides more hooks in the lifecycle of the transformation of a source element. Specifically, it includes:-
reevaluate(A, B)
which is called when an element is mutated in place and thus run through this mapping function again. It provides access to the previous value returned from this function in case it is of use when remapping the same element. -
dispose(A, B)
which is called when an element is removed from the FunctionList and is meant to be location that cleans up any resources the Function may have allocated. (like Listeners for example)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose(A sourceValue, B transformedValue)
Perform any necessary resource cleanup on the givensourceValue
andtransformedValue
as they are removed from the FunctionList such as installed listeners.B
reevaluate(A sourceValue, B transformedValue)
Evaluate thesourceValue
again to produce the corresponding value in the FunctionList.-
Methods inherited from interface ca.odell.glazedlists.FunctionList.Function
evaluate
-
-
-
-
Method Detail
-
reevaluate
B reevaluate(A sourceValue, B transformedValue)
Evaluate thesourceValue
again to produce the corresponding value in the FunctionList. The lasttransformedValue
is provided as a reference when evaluating asourceValue
that has previously been evaluated.- Parameters:
sourceValue
- the Object to transform (again)transformedValue
- the Object produced by this function the last time it evaluatedsourceValue
- Returns:
- the transformed version of the sourceValue
-
dispose
void dispose(A sourceValue, B transformedValue)
Perform any necessary resource cleanup on the givensourceValue
andtransformedValue
as they are removed from the FunctionList such as installed listeners.- Parameters:
sourceValue
- the Object that was transformedtransformedValue
- the Object that resulted from the last transformation
-
-