ca.odell.glazedlists
Interface FunctionList.AdvancedFunction<A,B>
- FunctionList.Function<A,B>
public static interface FunctionList.AdvancedFunction<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
resource the Function may have allocated. (like Listeners for
example)
If neither of these extensions to FunctionList are useful, users are
encouraged to implement only the Function interface for their forward
function.
void | dispose(A sourceValue, B transformedValue) - Perform any necessary resource cleanup on the given
sourceValue and transformedValue as they
are removed from the FunctionList.
|
B | reevaluate(A sourceValue, B transformedValue) - Evaluate the
sourceValue again to produce the
corresponding value in the FunctionList.
|
dispose
public void dispose(A sourceValue,
B transformedValue)
Perform any necessary resource cleanup on the given
sourceValue
and transformedValue
as they
are removed from the FunctionList. For example, an installed
listeners
sourceValue
- the Object that was transformedtransformedValue
- the Object that resulted from the last
transformation
reevaluate
public B reevaluate(A sourceValue,
B transformedValue)
Evaluate the sourceValue
again to produce the
corresponding value in the FunctionList. The last
transformedValue
is provided as a reference when
evaluating a sourceValue
that has previously been
evaluated.
sourceValue
- the Object to transform (again)transformedValue
- the Object produced by this function the
last time it evaluated sourceValue
- the transformed version of the sourceValue
Glazed Lists, Copyright © 2003-2006 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2007-12-21 23:49