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)
          Deprecated.  
 net.sf.staccatocommons.defs.predicate.Predicate<A> is(net.sf.staccatocommons.defs.predicate.Predicate<? super B> other)
           
 net.sf.staccatocommons.defs.predicate.Predicate<A> isEqual(B object)
          equivalent to then(Predicates.equal(object))
 boolean isIdentity()
           
 net.sf.staccatocommons.defs.predicate.Predicate<A> isNotNull()
          equivalent to then(Predicates.notNull());
 net.sf.staccatocommons.defs.predicate.Predicate<A> isNull()
          then(Predicates.null_())
 net.sf.staccatocommons.defs.predicate.Predicate<A> isSame(B object)
          equivalent to then(Predicates.same(object))
 net.sf.staccatocommons.defs.predicate.Predicate<A> notNull()
          Deprecated. Use isNotNull() instead
 net.sf.staccatocommons.defs.predicate.Predicate<A> null_()
          Deprecated. Use isNull() instead
 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)
          Deprecated.  
<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)
          Deprecated. Use is(Predicate) instead
 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)
Deprecated. Use is(Predicate) instead

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

is

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

isEqual

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

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

equal

public net.sf.staccatocommons.defs.predicate.Predicate<A> equal(B object)
Deprecated. 

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

isSame

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

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

same

public net.sf.staccatocommons.defs.predicate.Predicate<A> same(B object)
Deprecated. 

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

notNull

public net.sf.staccatocommons.defs.predicate.Predicate<A> notNull()
Deprecated. Use isNotNull() instead

equivalent to then(Predicates.notNull());

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

isNotNull

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

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

null_

public net.sf.staccatocommons.defs.predicate.Predicate<A> null_()
Deprecated. Use isNull() instead

then(Predicates.null_())

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

isNull

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

Specified by:
isNull 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.