A mathematical function from an n-D space to a 1-D space. For simplicity we always map to a 1-D space, and model maps to n-D spaces with n Functions.
Instances of Function are immutable once they are created (ie their parameters do not change over time).
@author Bryan TrippThe following features are supported:
Function
represents a pointer to some native function. {@link #invoke(Class,Object[],Map)} is the primary means to callthe function. Function call behavior may be modified by passing one of the following call flags: Implementations of this must be thread safe and must not maintain any invocation specific state.
@volantis-api-include-in PublicAPI @volantis-api-include-in ProfessionalServicesAPI @volantis-api-include-in InternalAPIThe application may occur at compile time (for a macro) or at run time (for a regular function). The result may be a relation, and so might any of the parameters.
Functions are registered in a {@link Schema}, and may be queried by name ( {@link Schema#getFunctions(String)}) then overloads resolved based on parameter types.
@see TableMacro @see ScalarFunctionThe Function interface can be implemented directly. However, most of the time JXPath's built-in implementations should suffice. See {@link ClassFunctions ClassFunctions} and {@link PackageFunctions PackageFunctions}. @author Dmitri Plotnikov @version $Revision: 1.5 $ $Date: 2003/03/11 00:59:12 $
This function can be registered using the {@link Socket#on(Function)} asclass Function<IOException>() { public void on(IOEXception ex) { } }
This is the equivalent of doingsocket.on(new Function<IOEXception>() { .... }
Anonymous functions call also be invoked if a {@link Decoder} match its typesocket.on(Event.ERROR, new Function<IOEXception>() { .... }
@param < T> @author Jeanfrancois Arcandsocket.decoder(new Decoder<String, POJO>(){ @Override public POJO decode(Event e, String message) { return new POJO(message); } } .on(new Function<POJO>() { .... }
NOTE: This class is not typically used directly, but is exposed for writers of extended XPath packages.
Implementations of Function
are functors which are used to evaluate a function-call within an XPath expression.
TODO: The function model currently lacks unit tests
Creation date: (6/6/01 2:00:01 PM) @author Bo Ilic
A function is an implementation that returns a value based on one of more arguments. A function instance is created for each occurrence of the function in the validation language. @author Steven Devijver @since Apr 23, 2005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|