net.sf.staccatocommons.defs
Interface Delayable<A,B>

Type Parameters:
A - argument type
B - type of returned thunk
All Known Subinterfaces:
Function<A,B>

@Applicative
public interface Delayable<A,B>

Delayables are delayed transformations that take one argument and return a thunk that will perform the processing when evaluated, by implementing a delayed(Object) method.

Author:
flbulgarelli
See Also:
Recomendations for implementing, Thunk

Method Summary
 Thunk<B> delayed(A arg)
          Asynchronously applies this Delayable, by returning a Thunk that will perform the actual transformation each time it is evaluated.
 Thunk<B> delayedValue(Thunk<? extends A> thunk)
          Asynchronously applies this Delayable on the thunk's value, by returning a Thunk that will perform the actual transformation each time it is evaluated.
 

Method Detail

delayed

@NonNull
Thunk<B> delayed(A arg)
Asynchronously applies this Delayable, by returning a Thunk that will perform the actual transformation each time it is evaluated.

Parameters:
arg -
Returns:
a new Thunk

delayedValue

@NonNull
Thunk<B> delayedValue(@NonNull
                              Thunk<? extends A> thunk)
Asynchronously applies this Delayable on the thunk's value, by returning a Thunk that will perform the actual transformation each time it is evaluated.

Parameters:
thunk - the thunk whose value will be transformed
Returns:
a new Thunk


Get Staccatocommons at SourceForge.net. Fast, secure and Free Open Source software downloads