public static final class Match.MatchFunction.When.Then<R> extends Object implements Match<R>
Match.MatchFunction, Match.MatchMonad<R>
Modifier and Type | Method and Description |
---|---|
R |
apply(Object o)
Applies this
Match to an Object . |
Match.MatchFunction.Otherwise<R> |
otherwise(java.util.function.Function<? super Object,? extends R> function) |
Match.MatchFunction.Otherwise<R> |
otherwise(R that) |
Match.MatchFunction.Otherwise<R> |
otherwise(java.util.function.Supplier<? extends R> supplier) |
Match.MatchFunction.Otherwise<R> |
otherwiseThrow(java.util.function.Supplier<? extends RuntimeException> supplier) |
<T> Match.MatchFunction.When<T,R> |
when(Function1<? super T,? extends Boolean> predicate) |
<T> Match.MatchFunction.WhenApplicable<T,R> |
whenApplicable(Function1<? super T,? extends R> function) |
<T> Match.MatchFunction.When<T,R> |
whenIs(T prototype) |
<T> Match.MatchFunction.When<T,R> |
whenIsIn(T... prototypes) |
<T> Match.MatchFunction.When<T,R> |
whenType(Class<T> type) |
Match.MatchFunction.When<Object,R> |
whenTypeIn(Class<?>... types) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
as, of, otherwise, otherwise, otherwise, otherwiseThrow, when, whenApplicable, whenIs, whenIsIn, whenType, whenTypeIn
andThen, compose, identity
public R apply(Object o)
Match
Match
to an Object
.public <T> Match.MatchFunction.When<T,R> when(Function1<? super T,? extends Boolean> predicate)
public <T> Match.MatchFunction.When<T,R> whenIs(T prototype)
public <T> Match.MatchFunction.When<T,R> whenIsIn(T... prototypes)
public <T> Match.MatchFunction.When<T,R> whenType(Class<T> type)
public Match.MatchFunction.When<Object,R> whenTypeIn(Class<?>... types)
public <T> Match.MatchFunction.WhenApplicable<T,R> whenApplicable(Function1<? super T,? extends R> function)
public Match.MatchFunction.Otherwise<R> otherwise(R that)
public Match.MatchFunction.Otherwise<R> otherwise(java.util.function.Function<? super Object,? extends R> function)
public Match.MatchFunction.Otherwise<R> otherwise(java.util.function.Supplier<? extends R> supplier)
public Match.MatchFunction.Otherwise<R> otherwiseThrow(java.util.function.Supplier<? extends RuntimeException> supplier)
Copyright © 2015. All Rights Reserved.