net.sf.staccatocommons.lang.function
Class AbstractFunction2<A,B,C>

java.lang.Object
  extended by net.sf.staccatocommons.lang.function.AbstractDelayable2<A,B,C>
      extended by net.sf.staccatocommons.lang.function.AbstractFunction2<A,B,C>
Type Parameters:
A - function first argument type
B - function second argument type
C - function return type
All Implemented Interfaces:
Applicable<A,Function<B,C>>, Applicable2<A,B,C>, Delayable2<A,B,C>, Function2<A,B,C>, NullSafeAware<Function2<A,B,C>>
Direct Known Subclasses:
AbstractFunction2.Soft

public abstract class AbstractFunction2<A,B,C>
extends AbstractDelayable2<A,B,C>
implements Function2<A,B,C>

Author:
flbulgarelli

Nested Class Summary
static class AbstractFunction2.Soft<A,B,C>
          AbstractFunction2 that handles exceptions by softening them using SoftException.soften(Throwable)
 
Constructor Summary
AbstractFunction2()
           
 
Method Summary
 Function<B,C> apply(A arg0)
           
 Function2<B,A,C> flip()
           
 Function2<A,B,C> nullSafe()
           
<D> Function2<D,B,C>
of(Applicable<? super D,? extends A> function)
           
<D> Function2<A,B,D>
then(Function<? super C,? extends D> other)
           
<A2,B2,D> Function3<A,B,A2,D>
then(Function2<C,B2,D> combinator, Function<? super A2,? extends B2> other)
           
 String toString()
           
 Function<Tuple2<A,B>,C> uncurry()
           
 
Methods inherited from class net.sf.staccatocommons.lang.function.AbstractDelayable2
delayed, delayedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.staccatocommons.defs.function.Function2
apply
 
Methods inherited from interface net.sf.staccatocommons.defs.Delayable2
delayed, delayedValue
 

Constructor Detail

AbstractFunction2

public AbstractFunction2()
Method Detail

apply

@NonNull
public Function<B,C> apply(A arg0)
Specified by:
apply in interface Applicable<A,Function<B,C>>
Specified by:
apply in interface Function2<A,B,C>

flip

public Function2<B,A,C> flip()
Specified by:
flip in interface Function2<A,B,C>

nullSafe

public final Function2<A,B,C> nullSafe()
Specified by:
nullSafe in interface Function2<A,B,C>
Specified by:
nullSafe in interface NullSafeAware<Function2<A,B,C>>

of

public <D> Function2<D,B,C> of(@NonNull
                               Applicable<? super D,? extends A> function)
Specified by:
of in interface Function2<A,B,C>

then

public <A2,B2,D> Function3<A,B,A2,D> then(@NonNull
                                          Function2<C,B2,D> combinator,
                                          @NonNull
                                          Function<? super A2,? extends B2> other)
Specified by:
then in interface Function2<A,B,C>

then

public <D> Function2<A,B,D> then(Function<? super C,? extends D> other)
Specified by:
then in interface Function2<A,B,C>

uncurry

public Function<Tuple2<A,B>,C> uncurry()
Specified by:
uncurry in interface Function2<A,B,C>

toString

public String toString()
Overrides:
toString in class Object


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