public abstract class Dispatching extends Object
| Constructor and Description |
|---|
Dispatching() |
| Modifier and Type | Method and Description |
|---|---|
static <R,T1,T2> BinaryAction<T1,T2> |
action(BinaryDelegate<R,T1,T2> delegate)
Adapts a binary delegate to a binary action.
|
static <R,T> Action<T> |
action(Delegate<R,T> delegate)
Adapts a delegate to an action.
|
static <R,T1,T2,T3> |
action(TernaryDelegate<R,T1,T2,T3> delegate)
Adapts a ternary delegate to a ternary action.
|
static <T> Runnable |
curry(Action<T> action,
T value)
Partial application of the first parameter to an action.
|
static <T1,T2> Action<T2> |
curry(BinaryAction<T1,T2> action,
T1 first)
Partial application of the first parameter to a binary action.
|
static <R,T1,T2> Delegate<R,T2> |
curry(BinaryDelegate<R,T1,T2> delegate,
T1 first)
Partial application of the first parameter to a binary delegate.
|
static <T1,T2> Predicate<T2> |
curry(BinaryPredicate<T1,T2> predicate,
T1 first)
Partial application of the first parameter to a binary predicate.
|
static <R,T> Provider<R> |
curry(Delegate<R,T> delegate,
T value)
Partial application of the parameter to a delegate.
|
static <T> Proposition |
curry(Predicate<T> predicate,
T value)
Partial application of the parameter to a predicate.
|
static <T1,T2,T3> BinaryAction<T2,T3> |
curry(TernaryAction<T1,T2,T3> action,
T1 first)
Partial application of the first parameter to a ternary action.
|
static <R,T1,T2,T3> |
curry(TernaryDelegate<R,T1,T2,T3> delegate,
T1 first)
Partial application of the first parameter to a ternary delegate.
|
static <T1,T2,T3> BinaryPredicate<T2,T3> |
curry(TernaryPredicate<T1,T2,T3> predicate,
T1 first)
Partial application of the first parameter to a ternary predicate.
|
static <T> Delegate<Void,T> |
delegate(Action<T> adaptee)
Adapts an action to a delegate.
|
static <T1,T2> BinaryDelegate<Void,T1,T2> |
delegate(BinaryAction<T1,T2> adaptee)
Adapts a binary action to a binary delegate.
|
static <T1,T2> BinaryDelegate<Boolean,T1,T2> |
delegate(BinaryPredicate<T1,T2> adaptee)
Adapts a binary predicate to a binary delegate.
|
static <T> Delegate<Boolean,T> |
delegate(Predicate<T> adaptee)
Adapts a predicate to a delegate.
|
static <T1,T2,T3> TernaryDelegate<Void,T1,T2,T3> |
delegate(TernaryAction<T1,T2,T3> adaptee)
Adapts a ternary action to a ternary delegate.
|
static <T1,T2,T3> TernaryDelegate<Boolean,T1,T2,T3> |
delegate(TernaryPredicate<T1,T2,T3> adaptee)
Adapts a ternary predicate to a ternary delegate.
|
static <T> Predicate<T> |
ignore(Proposition proposition,
Class<T> ignored)
Adapts a proposition to a predicate by ignoring the passed parameter.
|
static <R,T> Delegate<R,T> |
ignore(Provider<R> provider,
Class<T> ignored)
Adapts a provider to a delegate by ignoring the passed parameter.
|
static <T> Action<T> |
ignore(Runnable runnable,
Class<T> ignored)
Adapts a runnable to an action by ignoring the parameter.
|
static <T1,T2> BinaryAction<T1,T2> |
ignore1st(Action<T2> action,
Class<T1> ignored)
Adapts an action to a binary action by ignoring the first parameter.
|
static <T1,T2,T3> TernaryAction<T1,T2,T3> |
ignore1st(BinaryAction<T2,T3> action,
Class<T1> ignored)
Adapts a binary action to a ternary action by ignoring the first
parameter.
|
static <R,T1,T2,T3> |
ignore1st(BinaryDelegate<R,T2,T3> delegate,
Class<T1> ignored)
Adapts a binary delegate to a ternary delegate by ignoring the first
parameter.
|
static <T1,T2,T3> TernaryPredicate<T1,T2,T3> |
ignore1st(BinaryPredicate<T2,T3> predicate,
Class<T1> ignored)
Adapts a binary predicate to a ternary predicate by ignoring first
parameter.
|
static <R,T1,T2> BinaryDelegate<R,T1,T2> |
ignore1st(Delegate<R,T2> delegate,
Class<T1> ignored)
Adapts a delegate to a binary delegate by ignoring the first parameter.
|
static <T1,T2> BinaryPredicate<T1,T2> |
ignore1st(Predicate<T2> predicate,
Class<T1> ignored)
Adapts a predicate to a binary predicate by ignoring first parameter.
|
static <T1,T2> BinaryAction<T1,T2> |
ignore2nd(Action<T1> action,
Class<T2> ignored)
Adapts an action to a binary action by ignoring the second parameter.
|
static <T1,T2,T3> TernaryAction<T1,T2,T3> |
ignore2nd(BinaryAction<T1,T3> action,
Class<T2> ignored)
Adapts a binary action to a ternary action by ignoring the second
parameter.
|
static <R,T1,T2,T3> |
ignore2nd(BinaryDelegate<R,T1,T3> delegate,
Class<T2> ignored)
Adapts a binary delegate to a ternary delegate by ignoring the second
parameter.
|
static <T1,T2,T3> TernaryPredicate<T1,T2,T3> |
ignore2nd(BinaryPredicate<T1,T3> predicate,
Class<T2> ignored)
Adapts a binary predicate to a ternary predicate by ignoring second
parameter.
|
static <R,T1,T2> BinaryDelegate<R,T1,T2> |
ignore2nd(Delegate<R,T1> delegate,
Class<T2> ignored)
Adapts a delegate to a binary delegate by ignoring the second parameter.
|
static <T1,T2> BinaryPredicate<T1,T2> |
ignore2nd(Predicate<T1> predicate,
Class<T2> ignored)
Adapts a predicate to a binary predicate by ignoring second parameter.
|
static <T1,T2,T3> TernaryAction<T1,T2,T3> |
ignore3rd(BinaryAction<T1,T2> action,
Class<T3> ignored)
Adapts a binary action to a ternary action by ignoring the third
parameter.
|
static <R,T1,T2,T3> |
ignore3rd(BinaryDelegate<R,T1,T2> delegate,
Class<T3> ignored)
Adapts a binary delegate to a ternary delegate by ignoring the third
parameter.
|
static <T1,T2,T3> TernaryPredicate<T1,T2,T3> |
ignore3rd(BinaryPredicate<T1,T2> predicate,
Class<T3> ignored)
Adapts a binary predicate to a ternary predicate by ignoring third
parameter.
|
static <T1,T2,T3> BinaryAction<T1,T3> |
mcurry(TernaryAction<T1,T2,T3> action,
T2 second)
Partial application of the second (middle) parameter to a ternary action.
|
static <R,T1,T2,T3> |
mcurry(TernaryDelegate<R,T1,T2,T3> delegate,
T2 second)
Partial application of the second (middle) parameter to a ternary
delegate.
|
static <T1,T2,T3> BinaryPredicate<T1,T3> |
mcurry(TernaryPredicate<T1,T2,T3> predicate,
T2 second)
Partial application of the second (middle) parameter to a ternary
predicate.
|
static <T1,T2> BinaryPredicate<T1,T2> |
predicate(BinaryDelegate<Boolean,T1,T2> delegate)
Adapts a binary delegate to a binary predicate
|
static <T> Predicate<T> |
predicate(Delegate<Boolean,T> delegate)
Adapts a delegate to a predicate.
|
static <T1,T2,T3> TernaryPredicate<T1,T2,T3> |
predicate(TernaryDelegate<Boolean,T1,T2,T3> delegate)
Adapts a ternary delegate to a ternary predicate.
|
static Proposition |
proposition(Provider<Boolean> provider)
Adapts a provider to a proposition.
|
static <T> Provider<Maybe<T>> |
provider(Iterator<T> adaptee)
Adapts an iterator to a provider.
|
static Provider<Boolean> |
provider(Proposition adaptee)
Adapts a proposition to a provider.
|
static Provider<Void> |
provider(Runnable adaptee)
Adapts a runnable to a provider.
|
static <T1,T2> Action<T1> |
rcurry(BinaryAction<T1,T2> action,
T2 second)
Partial application of the last (rightmost) parameter to a binary action.
|
static <R,T1,T2> Delegate<R,T1> |
rcurry(BinaryDelegate<R,T1,T2> delegate,
T2 second)
Partial application of the last (rightmost) parameter to a binary
delegate.
|
static <T1,T2> Predicate<T1> |
rcurry(BinaryPredicate<T1,T2> predicate,
T2 second)
Partial application of the last (rightmost) parameter to a binary
predicate.
|
static <T1,T2,T3> BinaryAction<T1,T2> |
rcurry(TernaryAction<T1,T2,T3> action,
T3 third)
Partial application of the last (rightmost) parameter to a ternary
action.
|
static <R,T1,T2,T3> |
rcurry(TernaryDelegate<R,T1,T2,T3> delegate,
T3 third)
Partial application of the last (rightmost) parameter to a ternary
delegate.
|
static <T1,T2,T3> BinaryPredicate<T1,T2> |
rcurry(TernaryPredicate<T1,T2,T3> predicate,
T3 third)
Partial application of the last (rightmost) parameter to a ternary
predicate.
|
static <T> Runnable |
runnable(Provider<T> provider)
Adapts a provider to a runnable.
|
public static <T> Runnable curry(Action<T> action, T value)
T - the action parameter typeaction - the action to be curriedvalue - the value to be curriedpublic static <T1,T2> Action<T2> curry(BinaryAction<T1,T2> action, T1 first)
T1 - the action former parameter typeT2 - the action latter parameter typeaction - the binary action to be curriedfirst - the value to be curried as first parameterpublic static <T1,T2,T3> BinaryAction<T2,T3> curry(TernaryAction<T1,T2,T3> action, T1 first)
T1 - the action first parameter typeT2 - the action second parameter typeT3 - the action third parameter typeaction - the ternary action to be curried as first parameterfirst - the value to be curriedpublic static <T> Proposition curry(Predicate<T> predicate, T value)
T - the predicate parameter typepredicate - the predicate to be curriedvalue - the value to be curriedpublic static <T1,T2> Predicate<T2> curry(BinaryPredicate<T1,T2> predicate, T1 first)
T1 - the predicate former parameter typeT2 - the predicate latter parameter typepredicate - the predicate to be curriedfirst - the value to be curried as first parameterpublic static <T1,T2,T3> BinaryPredicate<T2,T3> curry(TernaryPredicate<T1,T2,T3> predicate, T1 first)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeT3 - the predicate third parameter typepredicate - the predicate to be curriedfirst - the value to be curried as first parameterpublic static <R,T> Provider<R> curry(Delegate<R,T> delegate, T value)
R - the delegate return typeT - the delegate parameter typedelegate - the delegate to be curriedvalue - the value to be curriedpublic static <R,T1,T2> Delegate<R,T2> curry(BinaryDelegate<R,T1,T2> delegate, T1 first)
R - the delegate return typeT1 - the delegate first parameter typeT2 - the delegate second parameter typedelegate - the delegate to be curriedfirst - the value to be curried as first parameterpublic static <R,T1,T2,T3> BinaryDelegate<R,T2,T3> curry(TernaryDelegate<R,T1,T2,T3> delegate, T1 first)
R - the delegate return typeT1 - the delegate first parameter typeT2 - the delegate second parameter typeT3 - the delegate third parameter typedelegate - the delegate to be curriedfirst - the value to be curried as first parameterpublic static <T1,T2,T3> BinaryAction<T1,T3> mcurry(TernaryAction<T1,T2,T3> action, T2 second)
T1 - the action first parameter typeT2 - the action second parameter typeT3 - the action third parameter typeaction - the action to be curriedsecond - the value to be curried as second parameterpublic static <R,T1,T2,T3> BinaryDelegate<R,T1,T3> mcurry(TernaryDelegate<R,T1,T2,T3> delegate, T2 second)
R - the delegate return typeT1 - the delegate first parameter typeT2 - the delegate second parameter typeT3 - the delegate third parameter typedelegate - the delegate to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2,T3> BinaryPredicate<T1,T3> mcurry(TernaryPredicate<T1,T2,T3> predicate, T2 second)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeT3 - the predicate third parameter typepredicate - the predicate to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2> Action<T1> rcurry(BinaryAction<T1,T2> action, T2 second)
T1 - the action first parameter typeT2 - the action second parameter typeaction - the action to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2,T3> BinaryAction<T1,T2> rcurry(TernaryAction<T1,T2,T3> action, T3 third)
T1 - the action first parameter typeT2 - the action second parameter typeT3 - the action third parameter typeaction - the action to be curriedthird - the value to be curried as third parameterpublic static <T1,T2> Predicate<T1> rcurry(BinaryPredicate<T1,T2> predicate, T2 second)
T1 - the predicate first parameter typeT2 - the predicate second parameter typepredicate - the predicate to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2,T3> BinaryPredicate<T1,T2> rcurry(TernaryPredicate<T1,T2,T3> predicate, T3 third)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeT3 - the predicate third parameter typepredicate - the predicate to be curriedthird - the value to be curried as third parameterpublic static <R,T1,T2> Delegate<R,T1> rcurry(BinaryDelegate<R,T1,T2> delegate, T2 second)
R - the delegate return typeT1 - the delegate first parameter typeT2 - the delegate second parameter typedelegate - the delegate to be curriedsecond - the value to be curried as second parameterpublic static <R,T1,T2,T3> BinaryDelegate<R,T1,T2> rcurry(TernaryDelegate<R,T1,T2,T3> delegate, T3 third)
R - the delegate return typeT1 - the delegate first parameter typeT2 - the delegate second parameter typeT3 - the delegate third parameter typedelegate - the delegate to be curriedthird - the value to be curried as third parameterpublic static <T> Predicate<T> ignore(Proposition proposition, Class<T> ignored)
T - the predicate parameter typeproposition - the proposition to be adaptedignored - the adapted predicate parameter type classpublic static <T1,T2> BinaryPredicate<T1,T2> ignore1st(Predicate<T2> predicate, Class<T1> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T1,T2,T3> TernaryPredicate<T1,T2,T3> ignore1st(BinaryPredicate<T2,T3> predicate, Class<T1> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typeT3 - the adapted predicate third parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T1,T2> BinaryPredicate<T1,T2> ignore2nd(Predicate<T1> predicate, Class<T2> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T1,T2,T3> TernaryPredicate<T1,T2,T3> ignore2nd(BinaryPredicate<T1,T3> predicate, Class<T2> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typeT3 - the adapted predicate third parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T1,T2,T3> TernaryPredicate<T1,T2,T3> ignore3rd(BinaryPredicate<T1,T2> predicate, Class<T3> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typeT3 - the adapted predicate third parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T> Action<T> ignore(Runnable runnable, Class<T> ignored)
T - the adapted action parameter typerunnable - the runnable to be adaptedignored - the adapted action ignored parameter type classpublic static <T1,T2> BinaryAction<T1,T2> ignore1st(Action<T2> action, Class<T1> ignored)
T1 - the adapted action first parameter typeT2 - the adapted action second parameter typeaction - the action to be adaptedignored - the adapted action ignored parameter type classpublic static <T1,T2,T3> TernaryAction<T1,T2,T3> ignore1st(BinaryAction<T2,T3> action, Class<T1> ignored)
T1 - the adapted action first parameter typeT2 - the adapted action second parameter typeT3 - the adapted action third parameter typeaction - the action to be adaptedignored - the adapted action ignored parameter type classpublic static <T1,T2> BinaryAction<T1,T2> ignore2nd(Action<T1> action, Class<T2> ignored)
T1 - the adapted action first parameter typeT2 - the adapted action second parameter typeaction - the action to be adaptedignored - the adapted action ignored parameter type classpublic static <T1,T2,T3> TernaryAction<T1,T2,T3> ignore2nd(BinaryAction<T1,T3> action, Class<T2> ignored)
T1 - the adapted action first parameter typeT2 - the adapted action second parameter typeT3 - the adapted action third parameter typeaction - the action to be adaptedignored - the adapted action ignored parameter type classpublic static <T1,T2,T3> TernaryAction<T1,T2,T3> ignore3rd(BinaryAction<T1,T2> action, Class<T3> ignored)
T1 - the adapted action first parameter typeT2 - the adapted action second parameter typeT3 - the adapted action third parameter typeaction - the action to be adaptedignored - the adapted action ignored parameter type classpublic static <R,T> Delegate<R,T> ignore(Provider<R> provider, Class<T> ignored)
R - the adapted delegate result typeT - the adapted delegate parameter typeprovider - the provider to be adaptedignored - the adapted delegate ignored parameter type classpublic static <R,T1,T2> BinaryDelegate<R,T1,T2> ignore1st(Delegate<R,T2> delegate, Class<T1> ignored)
R - the adapted delegate result typeT1 - the adapted delegate first parameter typeT2 - the adapted delegate second parameter typedelegate - the delegate to be adaptedignored - the adapted delegate ignored parameter type classpublic static <R,T1,T2,T3> TernaryDelegate<R,T1,T2,T3> ignore1st(BinaryDelegate<R,T2,T3> delegate, Class<T1> ignored)
R - the adapted delegate result typeT1 - the adapted delegate first parameter typeT2 - the adapted delegate second parameter typeT3 - the adapted delegate third parameter typedelegate - the delegate to be adaptedignored - the adapted delegate ignored parameter type classpublic static <R,T1,T2> BinaryDelegate<R,T1,T2> ignore2nd(Delegate<R,T1> delegate, Class<T2> ignored)
R - the adapted delegate result typeT1 - the adapted delegate first parameter typeT2 - the adapted delegate second parameter typedelegate - the delegate to be adaptedignored - the adapted delegate ignored parameter type classpublic static <R,T1,T2,T3> TernaryDelegate<R,T1,T2,T3> ignore2nd(BinaryDelegate<R,T1,T3> delegate, Class<T2> ignored)
R - the adapted delegate result typeT1 - the adapted delegate first parameter typeT2 - the adapted delegate second parameter typeT3 - the adapted delegate third parameter typedelegate - the delegate to be adaptedignored - the adapted delegate ignored parameter type classpublic static <R,T1,T2,T3> TernaryDelegate<R,T1,T2,T3> ignore3rd(BinaryDelegate<R,T1,T2> delegate, Class<T3> ignored)
R - the adapted delegate result typeT1 - the adapted delegate first parameter typeT2 - the adapted delegate second parameter typeT3 - the adapted delegate third parameter typedelegate - the delegate to be adaptedignored - the adapted delegate ignored parameter type classpublic static <T> Provider<Maybe<T>> provider(Iterator<T> adaptee)
adaptee - the runnable to be adaptedpublic static Provider<Void> provider(Runnable adaptee)
adaptee - the runnable to be adaptedpublic static Provider<Boolean> provider(Proposition adaptee)
adaptee - the proposition to be adaptedpublic static <T> Delegate<Void,T> delegate(Action<T> adaptee)
T - the action parameter typeadaptee - the action to be adaptedpublic static <T1,T2> BinaryDelegate<Void,T1,T2> delegate(BinaryAction<T1,T2> adaptee)
T1 - the action first parameter typeT2 - the action second parameter typeadaptee - the action to be adaptedpublic static <T1,T2,T3> TernaryDelegate<Void,T1,T2,T3> delegate(TernaryAction<T1,T2,T3> adaptee)
T1 - the action first parameter typeT2 - the action second parameter typeT3 - the action third parameter typeadaptee - the action to be adaptedpublic static <T> Delegate<Boolean,T> delegate(Predicate<T> adaptee)
T - the predicate parameter typeadaptee - the predicate to be adaptedpublic static <T1,T2> BinaryDelegate<Boolean,T1,T2> delegate(BinaryPredicate<T1,T2> adaptee)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeadaptee - the predicate to be adaptedpublic static <T1,T2,T3> TernaryDelegate<Boolean,T1,T2,T3> delegate(TernaryPredicate<T1,T2,T3> adaptee)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeT3 - the predicate third parameter typeadaptee - the predicate to be adaptedpublic static <T> Runnable runnable(Provider<T> provider)
T - the provider parameter typeprovider - the provider to be adaptedpublic static <R,T> Action<T> action(Delegate<R,T> delegate)
R - the delegate return typeT - the delegate parameter typedelegate - the delegate to be adaptedpublic static <R,T1,T2> BinaryAction<T1,T2> action(BinaryDelegate<R,T1,T2> delegate)
R - the delegate return typeT1 - the delegate first parameter typeT2 - the delegate second parameter typedelegate - the delegate to be adaptedpublic static <R,T1,T2,T3> TernaryAction<T1,T2,T3> action(TernaryDelegate<R,T1,T2,T3> delegate)
R - the delegate return typeT1 - the delegate first parameter typeT2 - the delegate second parameter typeT3 - the delegate third parameter typedelegate - the delegate to be adaptedpublic static Proposition proposition(Provider<Boolean> provider)
provider - the provider to be adaptedpublic static <T> Predicate<T> predicate(Delegate<Boolean,T> delegate)
T - the delegate parameter typedelegate - the delegate to be adaptedpublic static <T1,T2> BinaryPredicate<T1,T2> predicate(BinaryDelegate<Boolean,T1,T2> delegate)
T1 - the delegate first parameter typeT2 - the delegate second parameter typedelegate - the delegate to be adaptedpublic static <T1,T2,T3> TernaryPredicate<T1,T2,T3> predicate(TernaryDelegate<Boolean,T1,T2,T3> delegate)
T1 - the delegate first parameter typeT2 - the delegate second parameter typeT3 - the delegate third parameter typedelegate - the delegate to be adaptedCopyright © 2013. All Rights Reserved.