net.sf.staccatocommons.defs.function
Interface Function3<A,B,C,D>

Type Parameters:
A - function first argument type
B - function second argument type
C - function return type
All Superinterfaces:
Applicable<A,Function2<B,C,D>>, Applicable2<A,B,Function<C,D>>, Applicable3<A,B,C,D>, Delayable3<A,B,C,D>, NullSafeAware<Function3<A,B,C,D>>

@Applicative
public interface Function3<A,B,C,D>
extends Applicable3<A,B,C,D>, Applicable2<A,B,Function<C,D>>, Applicable<A,Function2<B,C,D>>, NullSafeAware<Function3<A,B,C,D>>, Delayable3<A,B,C,D>

Function3s are rich interfaced Applicable3s - two arguments Delayable3 and NullSafeAware transformations. Function3 can also be partially applied, which means, applying it with less arguments than required, returning, instead of the result of the transformation, a new function that expects the rest of the arguments. Thus, Function3 do also implement Applicable and Applicable2

Author:
flbulgarelli

Method Summary
 Function2<B,C,D> apply(A arg0)
          Partially applies the function, passing only its first argument
 Function<C,D> apply(A arg0, B arg1)
          Partially applies the function, passing only its first and second arguments
 D apply(A arg0, B arg1, C arg2)
          Performs a transformation on the given element, and returns its result.
 Function3<A,B,C,D> nullSafe()
          Answers a new function that returns null if any of its arguments is null, or the result of applying this function, otherwise.
 Function<Tuple3<A,B,C>,D> uncurry()
          Uncurries this function, by returning a Function that takes a single triple, being its components each of the original function parameters
 
Methods inherited from interface net.sf.staccatocommons.defs.Delayable3
delayed, delayedValue
 

Method Detail

apply

Function2<B,C,D> apply(A arg0)
Partially applies the function, passing only its first argument

Specified by:
apply in interface Applicable<A,Function2<B,C,D>>
Parameters:
arg0 - the transformation
Returns:
the transformation result

apply

Function<C,D> apply(A arg0,
                    B arg1)
Partially applies the function, passing only its first and second arguments

Specified by:
apply in interface Applicable2<A,B,Function<C,D>>
Parameters:
arg0 - the first transformation argument
arg1 - the second transformation argument
Returns:
the transformation result

apply

D apply(A arg0,
        B arg1,
        C arg2)
Description copied from interface: Applicable3
Performs a transformation on the given element, and returns its result.

Specified by:
apply in interface Applicable3<A,B,C,D>
Parameters:
arg0 - the first transformation argument
arg1 - the second transformation argument
arg2 - the third transformation argument
Returns:
the transformation result

nullSafe

@NullSafe
Function3<A,B,C,D> nullSafe()
Answers a new function that returns null if any of its arguments is null, or the result of applying this function, otherwise.

Specified by:
nullSafe in interface NullSafeAware<Function3<A,B,C,D>>
Returns:
a new null-safe Function3

uncurry

Function<Tuple3<A,B,C>,D> uncurry()
Uncurries this function, by returning a Function that takes a single triple, being its components each of the original function parameters

Returns:
a new Function


Get Staccatocommons at SourceForge.net. Fast, secure and Free Open Source software downloads