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

java.lang.Object
  extended by net.sf.staccatocommons.lang.function.AbstractDelayable<A,B>
      extended by net.sf.staccatocommons.lang.function.AbstractFunction<A,B>
Type Parameters:
A - function argument type
B - function return type
All Implemented Interfaces:
net.sf.staccatocommons.defs.Applicable<A,B>, net.sf.staccatocommons.defs.Delayable<A,B>, net.sf.staccatocommons.defs.function.Function<A,B>, net.sf.staccatocommons.defs.partial.NullSafeAware<net.sf.staccatocommons.defs.function.Function<A,B>>
Direct Known Subclasses:
AbstractFunction.Soft, Add, TopLevelFunction

public abstract class AbstractFunction<A,B>
extends AbstractDelayable<A,B>
implements net.sf.staccatocommons.defs.function.Function<A,B>

Author:
flbulgarelli

Nested Class Summary
static class AbstractFunction.Soft<A,B>
          AbstractFunction that handles exceptions by softening them using SoftException.soften(Throwable)
 
Constructor Summary
AbstractFunction()
           
 
Method Summary
 net.sf.staccatocommons.defs.predicate.Predicate<A> equal(B object)
          equivalent to then(Predicates.equal(object))
 boolean isIdentity()
           
 net.sf.staccatocommons.defs.predicate.Predicate<A> notNull()
          equivalent to then(Predicates.notNull());
 net.sf.staccatocommons.defs.predicate.Predicate<A> null_()
          then(Predicates.null_())
 net.sf.staccatocommons.defs.function.Function<A,B> nullSafe()
           
<C> net.sf.staccatocommons.defs.function.Function<C,B>
of(net.sf.staccatocommons.defs.Applicable<? super C,? extends A> other)
           
<Tp1,Tp2> net.sf.staccatocommons.defs.function.Function2<Tp1,Tp2,B>
of(net.sf.staccatocommons.defs.Applicable2<Tp1,Tp2,? extends A> other)
           
<Tp1,Tp2,Tp3>
net.sf.staccatocommons.defs.function.Function3<Tp1,Tp2,Tp3,B>
of(net.sf.staccatocommons.defs.Applicable3<Tp1,Tp2,Tp3,? extends A> other)
           
 net.sf.staccatocommons.defs.predicate.Predicate<A> same(B object)
          equivalent to then(Predicates.same(object))
<C> net.sf.staccatocommons.defs.function.Function<A,C>
then(net.sf.staccatocommons.defs.function.Function<? super B,? extends C> other)
           
<A2,B2,C> net.sf.staccatocommons.defs.function.Function2<A,A2,C>
then(net.sf.staccatocommons.defs.function.Function2<B,B2,C> combinator, net.sf.staccatocommons.defs.function.Function<? super A2,? extends B2> other)
           
 net.sf.staccatocommons.defs.predicate.Predicate<A> then(net.sf.staccatocommons.defs.predicate.Predicate<? super B> other)
           
 String toString()
           
 
Methods inherited from class net.sf.staccatocommons.lang.function.AbstractDelayable
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.Applicable
apply
 
Methods inherited from interface net.sf.staccatocommons.defs.Delayable
delayed, delayedValue
 

Constructor Detail

AbstractFunction

public AbstractFunction()
Method Detail

of

@NonNull
public <C> net.sf.staccatocommons.defs.function.Function<C,B> of(@NonNull
                                                                         net.sf.staccatocommons.defs.Applicable<? super C,? extends A> other)
Specified by:
of in interface net.sf.staccatocommons.defs.function.Function<A,B>

of

@NonNull
public <Tp1,Tp2> net.sf.staccatocommons.defs.function.Function2<Tp1,Tp2,B> of(@NonNull
                                                                                      net.sf.staccatocommons.defs.Applicable2<Tp1,Tp2,? extends A> other)
Specified by:
of in interface net.sf.staccatocommons.defs.function.Function<A,B>

of

@NonNull
public <Tp1,Tp2,Tp3> net.sf.staccatocommons.defs.function.Function3<Tp1,Tp2,Tp3,B> of(@NonNull
                                                                                              net.sf.staccatocommons.defs.Applicable3<Tp1,Tp2,Tp3,? extends A> other)
Specified by:
of in interface net.sf.staccatocommons.defs.function.Function<A,B>

nullSafe

@NonNull
public net.sf.staccatocommons.defs.function.Function<A,B> nullSafe()
Specified by:
nullSafe in interface net.sf.staccatocommons.defs.function.Function<A,B>
Specified by:
nullSafe in interface net.sf.staccatocommons.defs.partial.NullSafeAware<net.sf.staccatocommons.defs.function.Function<A,B>>

then

public <C> net.sf.staccatocommons.defs.function.Function<A,C> then(@NonNull
                                                                   net.sf.staccatocommons.defs.function.Function<? super B,? extends C> other)
Specified by:
then in interface net.sf.staccatocommons.defs.function.Function<A,B>

then

public net.sf.staccatocommons.defs.predicate.Predicate<A> then(@NonNull
                                                               net.sf.staccatocommons.defs.predicate.Predicate<? super B> other)
Specified by:
then in interface net.sf.staccatocommons.defs.function.Function<A,B>

equal

public net.sf.staccatocommons.defs.predicate.Predicate<A> equal(B object)
equivalent to then(Predicates.equal(object))

Specified by:
equal in interface net.sf.staccatocommons.defs.function.Function<A,B>

same

public net.sf.staccatocommons.defs.predicate.Predicate<A> same(B object)
equivalent to then(Predicates.same(object))

Specified by:
same in interface net.sf.staccatocommons.defs.function.Function<A,B>

notNull

public net.sf.staccatocommons.defs.predicate.Predicate<A> notNull()
equivalent to then(Predicates.notNull());

Specified by:
notNull in interface net.sf.staccatocommons.defs.function.Function<A,B>

null_

public net.sf.staccatocommons.defs.predicate.Predicate<A> null_()
then(Predicates.null_())

Specified by:
null_ in interface net.sf.staccatocommons.defs.function.Function<A,B>

then

public <A2,B2,C> net.sf.staccatocommons.defs.function.Function2<A,A2,C> then(net.sf.staccatocommons.defs.function.Function2<B,B2,C> combinator,
                                                                             net.sf.staccatocommons.defs.function.Function<? super A2,? extends B2> other)
Specified by:
then in interface net.sf.staccatocommons.defs.function.Function<A,B>

toString

public String toString()
Overrides:
toString in class Object

isIdentity

public boolean isIdentity()
Specified by:
isIdentity in interface net.sf.staccatocommons.defs.function.Function<A,B>


Copyright © 2010-2012 Staccatocommons. All Rights Reserved.