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.Builder<A,B> |
static class |
PartiallyApplied.First<A,P> |
static class |
PartiallyApplied.Second<A,P> |
| Modifier and Type | Method and Description |
|---|---|
static <A,B> PartiallyApplied.Builder<A,B> |
method(BiConsumer<A,B> method)
Creates a new builder of the partially applied method call.
|
public static <A,B> PartiallyApplied.Builder<A,B> method(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 appliedCopyright © 2015 Red Hat, Inc.. All rights reserved.