net.sf.staccatocommons.lang.function
Class AbstractFunction<A,B>
java.lang.Object
net.sf.staccatocommons.lang.function.AbstractDelayable<A,B>
net.sf.staccatocommons.lang.function.AbstractFunction<A,B>
- Type Parameters:
A - function argument typeB - function return type
- All Implemented Interfaces:
- Applicable<A,B>, Delayable<A,B>, Function<A,B>, NullSafeAware<Function<A,B>>
- Direct Known Subclasses:
- AbstractFunction.Soft
public abstract class AbstractFunction<A,B>
- extends AbstractDelayable<A,B>
- implements Function<A,B>
- Author:
- flbulgarelli
|
Method Summary |
Predicate<A> |
equal(B object)
equivalent to then(Predicates.equal(object)) |
boolean |
isIdentity()
|
Predicate<A> |
notNull()
equivalent to then(Predicates.notNull()); |
Predicate<A> |
null_()
then(Predicates.null_()) |
Function<A,B> |
nullSafe()
|
|
of(Applicable<? super C,? extends A> other)
|
|
of(Applicable2<Tp1,Tp2,? extends A> other)
|
|
of(Applicable3<Tp1,Tp2,Tp3,? extends A> other)
|
Predicate<A> |
same(B object)
equivalent to then(Predicates.same(object)) |
|
then(Function<? super B,? extends C> other)
|
|
then(Function2<B,B2,C> combinator,
Function<? super A2,? extends B2> other)
|
Predicate<A> |
then(Predicate<? super B> other)
|
String |
toString()
|
| Methods inherited from interface net.sf.staccatocommons.defs.Applicable |
apply |
AbstractFunction
public AbstractFunction()
of
@NonNull
public <C> Function<C,B> of(@NonNull
Applicable<? super C,? extends A> other)
- Specified by:
of in interface Function<A,B>
of
@NonNull
public <Tp1,Tp2> Function2<Tp1,Tp2,B> of(@NonNull
Applicable2<Tp1,Tp2,? extends A> other)
- Specified by:
of in interface Function<A,B>
of
@NonNull
public <Tp1,Tp2,Tp3> Function3<Tp1,Tp2,Tp3,B> of(@NonNull
Applicable3<Tp1,Tp2,Tp3,? extends A> other)
- Specified by:
of in interface Function<A,B>
nullSafe
@NonNull
public Function<A,B> nullSafe()
- Specified by:
nullSafe in interface Function<A,B>- Specified by:
nullSafe in interface NullSafeAware<Function<A,B>>
then
public <C> Function<A,C> then(@NonNull
Function<? super B,? extends C> other)
- Specified by:
then in interface Function<A,B>
then
public Predicate<A> then(@NonNull
Predicate<? super B> other)
- Specified by:
then in interface Function<A,B>
equal
public Predicate<A> equal(B object)
- equivalent to then(Predicates.equal(object))
- Specified by:
equal in interface Function<A,B>
same
public Predicate<A> same(B object)
- equivalent to then(Predicates.same(object))
- Specified by:
same in interface Function<A,B>
notNull
public Predicate<A> notNull()
- equivalent to then(Predicates.notNull());
- Specified by:
notNull in interface Function<A,B>
null_
public Predicate<A> null_()
- then(Predicates.null_())
- Specified by:
null_ in interface Function<A,B>
then
public <A2,B2,C> Function2<A,A2,C> then(Function2<B,B2,C> combinator,
Function<? super A2,? extends B2> other)
- Specified by:
then in interface Function<A,B>
toString
public String toString()
- Overrides:
toString in class Object
isIdentity
public boolean isIdentity()
- Specified by:
isIdentity in interface Function<A,B>