net.sf.staccatocommons.lang.function.internal
Class IdentityFunction<A>

java.lang.Object
  extended by net.sf.staccatocommons.lang.function.AbstractDelayable<A,B>
      extended by net.sf.staccatocommons.lang.function.AbstractFunction<A,B>
          extended by net.sf.staccatocommons.lang.function.internal.TopLevelFunction<A,A>
              extended by net.sf.staccatocommons.lang.function.internal.IdentityFunction<A>
Type Parameters:
A -
All Implemented Interfaces:
Serializable, net.sf.staccatocommons.defs.Applicable<A,A>, net.sf.staccatocommons.defs.Delayable<A,A>, net.sf.staccatocommons.defs.function.Function<A,A>, net.sf.staccatocommons.defs.partial.NullSafeAware<net.sf.staccatocommons.defs.function.Function<A,A>>

public final class IdentityFunction<A>
extends TopLevelFunction<A,A>

Author:
flbulgarelli
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.staccatocommons.lang.function.AbstractFunction
AbstractFunction.Soft<A,B>
 
Constructor Summary
IdentityFunction()
           
 
Method Summary
 A apply(A argument)
           
 net.sf.staccatocommons.defs.Thunk<A> delayed(A arg)
           
 net.sf.staccatocommons.defs.Thunk<A> delayedValue(net.sf.staccatocommons.defs.Thunk<? extends A> thunk)
           
static
<I> net.sf.staccatocommons.defs.function.Function<I,I>
identity()
           
 boolean isIdentity()
           
 net.sf.staccatocommons.defs.function.Function<A,A> nullSafe()
           
<C> net.sf.staccatocommons.defs.function.Function<C,A>
of(net.sf.staccatocommons.defs.Applicable<? super C,? extends A> other)
           
<Tp1,Tp2> net.sf.staccatocommons.defs.function.Function2<Tp1,Tp2,A>
of(net.sf.staccatocommons.defs.Applicable2<Tp1,Tp2,? extends A> other)
           
 
Methods inherited from class net.sf.staccatocommons.lang.function.internal.TopLevelFunction
toString
 
Methods inherited from class net.sf.staccatocommons.lang.function.AbstractFunction
equal, notNull, null_, of, same, then, then, then
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentityFunction

public IdentityFunction()
Method Detail

apply

public A apply(A argument)

nullSafe

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

delayed

@NonNull
public net.sf.staccatocommons.defs.Thunk<A> delayed(A arg)
Specified by:
delayed in interface net.sf.staccatocommons.defs.Delayable<A,A>
Overrides:
delayed in class AbstractDelayable<A,A>

delayedValue

@NonNull
public net.sf.staccatocommons.defs.Thunk<A> delayedValue(net.sf.staccatocommons.defs.Thunk<? extends A> thunk)
Specified by:
delayedValue in interface net.sf.staccatocommons.defs.Delayable<A,A>
Overrides:
delayedValue in class AbstractDelayable<A,A>

of

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

of

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

identity

@Constant
public static <I> net.sf.staccatocommons.defs.function.Function<I,I> identity()
Type Parameters:
I -
Returns:
a constant instance

isIdentity

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


Copyright © 2010-2012 Staccatocommons. All Rights Reserved.