T - type of valuepublic final class Match<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Match<T> |
any()
Returns a Match that matches any value.
|
boolean |
equals(Object other) |
int |
hashCode() |
static <T> Match<T> |
ifNull()
Returns a Match that matches null values.
|
static <T> Match<T> |
ifValue(T value)
Returns a Match that matches only specified value.
|
<V> Match<V> |
map(Function<T,V> mapper)
Maps this instance to a Match of another type.
|
boolean |
matches(T other)
Checks if this instance matches specified value.
|
String |
toString() |
public static <T> Match<T> any()
T - match typepublic static <T> Match<T> ifNull()
T - match typepublic static <T> Match<T> ifValue(T value)
T - match typevalue - value to matchpublic <V> Match<V> map(Function<T,V> mapper)
V - new match typemapper - transformation functionpublic boolean matches(T other)
other - other valueCopyright © 2015. All rights reserved.