P - the type of the parameter that is NOT partially applied.public abstract class PartiallyApplied<P> extends Object implements rx.functions.Action1<P>
MyInfo context = ...;
observableInventory.observable(Interest.in(Tenant.class).being(Action.created())
.subscribe(PartiallyApplied.method(Receiver::method).first(context));
The Receiver.method above has the following signature: void method(MyInfo, Tenant).
If the partially applied method was created such as:
PartiallyApplied.method(Receiver::method).second(context)
The Receiver.method would have the signature: void method(Tenant, MyInfo).| Modifier and Type | Class and Description |
|---|---|
static class |
PartiallyApplied.ActionAppliedSecond<A,P> |
static class |
PartiallyApplied.ActionBase<P> |
static class |
PartiallyApplied.ActionBuilder<A,B> |
static class |
PartiallyApplied.ActionWithAppliedFirst<A,P> |
static class |
PartiallyApplied.FunctionBuilder<T,U,R> |
static class |
PartiallyApplied.FunctionWithAppliedFirst<T,U,R> |
static class |
PartiallyApplied.FunctionWithAppliedSecond<T,U,R> |
| Modifier and Type | Method and Description |
|---|---|
static <T,U,R> PartiallyApplied.FunctionBuilder<T,U,R> |
function(BiFunction<T,U,R> method) |
static <A,B> PartiallyApplied.ActionBuilder<A,B> |
procedure(BiConsumer<A,B> method)
Creates a new builder of the partially applied method call.
|
public static <A,B> PartiallyApplied.ActionBuilder<A,B> procedure(BiConsumer<A,B> method)
A - the type of the first parameter of the methodB - the type of the second parameter of the methodmethod - the method to be partially appliedpublic static <T,U,R> PartiallyApplied.FunctionBuilder<T,U,R> function(BiFunction<T,U,R> method)
Copyright © 2015 Red Hat, Inc.. All rights reserved.