net.sf.staccatocommons.lang.block
Class Block3<T1,T2,T3>

java.lang.Object
  extended by net.sf.staccatocommons.lang.function.AbstractDelayable3<T1,T2,T3,Void>
      extended by net.sf.staccatocommons.lang.block.Block3<T1,T2,T3>
Type Parameters:
T1 -
T2 -
T3 -
All Implemented Interfaces:
net.sf.staccatocommons.defs.Applicable<T1,Block2<T2,T3>>, net.sf.staccatocommons.defs.Applicable2<T1,T2,Block<T3>>, net.sf.staccatocommons.defs.Applicable3<T1,T2,T3,Void>, net.sf.staccatocommons.defs.Delayable3<T1,T2,T3,Void>, net.sf.staccatocommons.defs.Executable3<T1,T2,T3>, net.sf.staccatocommons.defs.partial.NullSafeAware<Block3<T1,T2,T3>>

public abstract class Block3<T1,T2,T3>
extends AbstractDelayable3<T1,T2,T3,Void>
implements net.sf.staccatocommons.defs.Executable3<T1,T2,T3>, net.sf.staccatocommons.defs.Applicable<T1,Block2<T2,T3>>, net.sf.staccatocommons.defs.Applicable2<T1,T2,Block<T3>>, net.sf.staccatocommons.defs.partial.NullSafeAware<Block3<T1,T2,T3>>

Author:
flbulgarelli

Constructor Summary
Block3()
           
 
Method Summary
 Block2<T2,T3> apply(T1 arg0)
           
 Block<T3> apply(T1 arg0, T2 arg1)
           
 Void apply(T1 arg0, T2 arg1, T3 arg2)
           
 void exec(T1 arg0, T2 arg1, T3 arg2)
          Executes this block.
 Block3<T1,T2,T3> nullSafe()
           
protected  void softExec(T1 arg0, T2 arg1, T3 arg2)
          Executes this block, potentially throwing a checked Exception
 Block3<T1,T2,T3> then(net.sf.staccatocommons.defs.Executable3<T1,T2,T3> other)
          Chains this block with the given executable, creating a new Block3 that executes this one and then the another one.
 String toString()
           
 
Methods inherited from class net.sf.staccatocommons.lang.function.AbstractDelayable3
delayed, delayedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Block3

public Block3()
Method Detail

exec

public void exec(T1 arg0,
                 T2 arg1,
                 T3 arg2)
Executes this block. This implementation just invokes softExec(Object, Object, Object), and softens any exception it may throw. Subclasses may override this behavior.

Specified by:
exec in interface net.sf.staccatocommons.defs.Executable3<T1,T2,T3>

softExec

protected void softExec(T1 arg0,
                        T2 arg1,
                        T3 arg2)
                 throws Exception
Executes this block, potentially throwing a checked Exception

Parameters:
arg0 - operation first argument
arg1 - operation second argument
arg2 - operation third argument
Throws:
Exception
See Also:
exec(Object, Object, Object)

apply

public final Void apply(T1 arg0,
                        T2 arg1,
                        T3 arg2)
Specified by:
apply in interface net.sf.staccatocommons.defs.Applicable3<T1,T2,T3,Void>

apply

@NonNull
public Block2<T2,T3> apply(T1 arg0)
Specified by:
apply in interface net.sf.staccatocommons.defs.Applicable<T1,Block2<T2,T3>>

apply

@NonNull
public Block<T3> apply(T1 arg0,
                               T2 arg1)
Specified by:
apply in interface net.sf.staccatocommons.defs.Applicable2<T1,T2,Block<T3>>

nullSafe

public Block3<T1,T2,T3> nullSafe()
Specified by:
nullSafe in interface net.sf.staccatocommons.defs.partial.NullSafeAware<Block3<T1,T2,T3>>

then

@NonNull
public Block3<T1,T2,T3> then(@NonNull
                                     net.sf.staccatocommons.defs.Executable3<T1,T2,T3> other)
Chains this block with the given executable, creating a new Block3 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 Executable3 provided

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010-2012 Staccatocommons. All Rights Reserved.