public class JavaGroovyEquivalents
extends java.lang.Object
Constructor and Description |
---|
JavaGroovyEquivalents() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
asNonnullString(java.lang.Object o) |
static java.lang.String |
asString(java.lang.Object o) |
static <T> java.util.Collection<T> |
elvis(java.util.Collection<T> preferred,
java.util.Collection<?> fallback)
simple elvislike operators; uses groovy truth
|
static <T> T |
elvis(java.lang.Iterable<?> preferences) |
static <T> T |
elvis(java.lang.Object... preferences) |
static java.lang.String |
elvis(java.lang.String preferred,
java.lang.String fallback) |
static <T> T |
elvis(T preferred,
T fallback) |
static java.lang.String |
elvisString(java.lang.Object preferred,
java.lang.Object fallback) |
static java.lang.Object |
fix(java.lang.Object o) |
static boolean |
groovyTruth(java.util.Collection<?> c) |
static boolean |
groovyTruth(java.lang.Object o) |
static boolean |
groovyTruth(java.lang.String s) |
static <any> |
groovyTruthFunction() |
static <T> <any> |
groovyTruthPredicate() |
static java.lang.String |
join(java.util.Collection<?> collection,
java.lang.String separator) |
static <K,V> java.util.Map<K,V> |
mapOf(K key1,
V val1) |
static <T> java.util.concurrent.Callable<T> |
toCallable(java.lang.Runnable job) |
static <T> <any> |
toPredicate(groovy.lang.Closure<java.lang.Boolean> c)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted.
|
static groovy.time.TimeDuration |
toTimeDuration(java.lang.Object duration)
Deprecated.
since 0.6.0 use
Duration.of(Object) |
public static java.lang.String join(java.util.Collection<?> collection, java.lang.String separator)
public static <T> java.util.Collection<T> elvis(java.util.Collection<T> preferred, java.util.Collection<?> fallback)
public static java.lang.String elvis(java.lang.String preferred, java.lang.String fallback)
public static java.lang.String elvisString(java.lang.Object preferred, java.lang.Object fallback)
public static <T> T elvis(T preferred, T fallback)
public static <T> T elvis(java.lang.Iterable<?> preferences)
public static <T> T elvis(java.lang.Object... preferences)
public static java.lang.Object fix(java.lang.Object o)
public static java.lang.String asString(java.lang.Object o)
public static java.lang.String asNonnullString(java.lang.Object o)
public static boolean groovyTruth(java.util.Collection<?> c)
public static boolean groovyTruth(java.lang.String s)
public static boolean groovyTruth(java.lang.Object o)
public static <T> <any> groovyTruthPredicate()
public static <any> groovyTruthFunction()
public static <K,V> java.util.Map<K,V> mapOf(K key1, V val1)
@Deprecated public static groovy.time.TimeDuration toTimeDuration(java.lang.Object duration)
Duration.of(Object)
@Deprecated public static <T> <any> toPredicate(groovy.lang.Closure<java.lang.Boolean> c)
public static <T> java.util.concurrent.Callable<T> toCallable(java.lang.Runnable job)