|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.japi.pf.UnitPFBuilder<I>
I
- the input type, that this PartialFunction to be applied to
This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing.public final class UnitPFBuilder<I>
A builder for PartialFunction
.
This is a specialized version of PFBuilder
to map java
void methods to BoxedUnit
.
Field Summary | |
---|---|
protected scala.PartialFunction<F,T> |
statements
|
Constructor Summary | |
---|---|
UnitPFBuilder()
Create a UnitPFBuilder. |
Method Summary | ||
---|---|---|
protected void |
addStatement(scala.PartialFunction<F,T> statement)
|
|
scala.PartialFunction<F,T> |
build()
Build a PartialFunction from this builder. |
|
|
match(java.lang.Class<P> type,
FI.TypedPredicate<P> predicate,
FI.UnitApply<P> apply)
Add a new case statement to this builder. |
|
|
match(java.lang.Class<P> type,
FI.UnitApply<P> apply)
Add a new case statement to this builder. |
|
UnitPFBuilder<I> |
matchAny(FI.UnitApply<java.lang.Object> apply)
Add a new case statement to this builder, that matches any argument. |
|
|
matchEquals(P object,
FI.TypedPredicate<P> predicate,
FI.UnitApply<P> apply)
Add a new case statement to this builder. |
|
|
matchEquals(P object,
FI.UnitApply<P> apply)
Add a new case statement to this builder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected scala.PartialFunction<F,T> statements
Constructor Detail |
---|
public UnitPFBuilder()
Method Detail |
---|
public <P> UnitPFBuilder<I> match(java.lang.Class<P> type, FI.UnitApply<P> apply)
type
- a type to match the argument againstapply
- an action to apply to the argument if the type matches
public <P> UnitPFBuilder<I> match(java.lang.Class<P> type, FI.TypedPredicate<P> predicate, FI.UnitApply<P> apply)
type
- a type to match the argument againstpredicate
- a predicate that will be evaluated on the argument if the type matchesapply
- an action to apply to the argument if the type matches and the predicate returns true
public <P> UnitPFBuilder<I> matchEquals(P object, FI.UnitApply<P> apply)
object
- the object to compare equals withapply
- an action to apply to the argument if the object compares equal
public <P> UnitPFBuilder<I> matchEquals(P object, FI.TypedPredicate<P> predicate, FI.UnitApply<P> apply)
object
- the object to compare equals withpredicate
- a predicate that will be evaluated on the argument if the object compares equalapply
- an action to apply to the argument if the object compares equal
public UnitPFBuilder<I> matchAny(FI.UnitApply<java.lang.Object> apply)
apply
- an action to apply to the argument
protected void addStatement(scala.PartialFunction<F,T> statement)
public scala.PartialFunction<F,T> build()
PartialFunction
from this builder.
After this call the builder will be reset.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |