public class Util extends Object
Some internally used helper methods, mostly copied from de.tototec.utils.functional project.
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
decapitalize(String string) |
static <T> boolean |
exists(Iterable<T> source,
F1<? super T,Boolean> exists) |
static <T> List<T> |
filter(Iterable<T> source,
F1<? super T,Boolean> accept) |
static <T> List<T> |
filterType(Iterable<?> source,
Class<T> type) |
static <T> Optional<T> |
find(Iterable<T> source,
F1<? super T,Boolean> accept) |
static <T> boolean |
forall(Iterable<T> source,
F1<? super T,Boolean> forall) |
static <R,T> List<R> |
map(Iterable<T> source,
F1<? super T,? extends R> convert) |
static <R,T> List<R> |
map(T[] source,
F1<? super T,? extends R> convert) |
static String |
mkString(Iterable<?> source,
String separator) |
static String |
mkString(Iterable<?> source,
String prefix,
String separator,
String suffix) |
static <T> String |
mkString(Iterable<T> source,
String prefix,
String separator,
String suffix,
F1<? super T,String> convert) |
static String |
mkString(Object[] source,
String separator) |
static <T> String |
mkString(T[] source,
String prefix,
String separator,
String suffix) |
static <T> String |
mkString(T[] source,
String prefix,
String separator,
String suffix,
F1<? super T,String> convert) |
public static String mkString(Iterable<?> source, String prefix, String separator, String suffix)
public static <T> String mkString(T[] source, String prefix, String separator, String suffix)
public static <T> String mkString(Iterable<T> source, String prefix, String separator, String suffix, F1<? super T,String> convert)
public static <T> String mkString(T[] source, String prefix, String separator, String suffix, F1<? super T,String> convert)
Copyright © 2019. All rights reserved.