net.sf.staccatocommons.lang.block
Class Block2<T1,T2>
java.lang.Object
net.sf.staccatocommons.lang.function.AbstractDelayable2<T1,T2,Void>
net.sf.staccatocommons.lang.block.Block2<T1,T2>
- Type Parameters:
T1 - T2 -
- All Implemented Interfaces:
- net.sf.staccatocommons.defs.Applicable<T1,Block<T2>>, net.sf.staccatocommons.defs.Applicable2<T1,T2,Void>, net.sf.staccatocommons.defs.Delayable2<T1,T2,Void>, net.sf.staccatocommons.defs.Executable2<T1,T2>, net.sf.staccatocommons.defs.partial.NullSafeAware<Block2<T1,T2>>
public abstract class Block2<T1,T2>
- extends AbstractDelayable2<T1,T2,Void>
- implements net.sf.staccatocommons.defs.Executable2<T1,T2>, net.sf.staccatocommons.defs.Applicable<T1,Block<T2>>, net.sf.staccatocommons.defs.partial.NullSafeAware<Block2<T1,T2>>
- Author:
- flbulgarelli
Block2
public Block2()
exec
public void exec(T1 arg0,
T2 arg1)
- Executes this block. This implementation just invokes
softExec(Object, Object), and softens any exception it may throw.
Subclasses may override this behavior.
- Specified by:
exec in interface net.sf.staccatocommons.defs.Executable2<T1,T2>
softExec
protected void softExec(T1 arg0,
T2 arg1)
throws Exception
- Executes this block, potentially throwing a checked
Exception
- Parameters:
arg0 - arg1 -
- Throws:
Exception- See Also:
exec(Object, Object)
apply
@NonNull
public Block<T2> apply(T1 arg0)
- Specified by:
apply in interface net.sf.staccatocommons.defs.Applicable<T1,Block<T2>>
apply
public Void apply(T1 arg0,
T2 arg1)
- Specified by:
apply in interface net.sf.staccatocommons.defs.Applicable2<T1,T2,Void>
nullSafe
public Block2<T1,T2> nullSafe()
- Specified by:
nullSafe in interface net.sf.staccatocommons.defs.partial.NullSafeAware<Block2<T1,T2>>
then
@NonNull
public final Block2<T1,T2> then(@NonNull
net.sf.staccatocommons.defs.Executable2<T1,T2> other)
- Chains this block with the given executable, creating a new
Block2
that executes this one and then the another one.
- Parameters:
other - the block to execute after this
- Returns:
- a new block that first invokes execute on this, and then on the
Executable2 provided
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010-2012 Staccatocommons. All Rights Reserved.