public final class SphereInternalUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
asImmutableList(T... elements) |
static <T> Set<T> |
asSet(T... params) |
static <K,V> Map<K,V> |
copyOf(Map<K,V> map) |
static <K,V,E extends Throwable> |
getOrThrow(Map<K,V> map,
K key,
Supplier<E> exceptionSupplier) |
static <T> List<T> |
immutableCopyOf(List<T> list) |
static <K,V> Map<K,V> |
immutableCopyOf(Map<K,V> map) |
static boolean |
isEmpty(Iterable<?> iterable) |
static <T> String |
join(List<T> list) |
static <T> List<T> |
listOf(List<? extends T> first,
List<? extends T> second) |
static <T> List<T> |
listOf(List<T> elements,
T element) |
static <T> List<T> |
listOf(T element,
T[] array) |
static <K,V> Map<K,V> |
mapOf(K key,
V value) |
static <K,V> Map<K,V> |
mapOf(K key1,
V value1,
K key2,
V value2) |
static <T> Iterable<T> |
requireNonEmpty(Iterable<T> iterable) |
static <T> List<T> |
reverse(List<T> list) |
static <T> Set<T> |
setOf(Set<T> first,
Set<T> second) |
static <T> Set<T> |
setOf(T element,
Set<T> set) |
static <T> Set<T> |
setOf(T element,
T[] array) |
static String |
slugify(String s) |
static String |
slugifyUnique(String s) |
static <T> List<T> |
toList(Iterable<T> iterable) |
static <T> Stream<T> |
toStream(Iterable<T> iterable) |
@SafeVarargs public static <T> List<T> asImmutableList(T... elements)
public static <T> List<T> listOf(T element, T[] array)
@SafeVarargs public static <T> Set<T> asSet(T... params)
public static <T> Set<T> setOf(T element, T[] array)
public static <K,V,E extends Throwable> V getOrThrow(Map<K,V> map, K key, Supplier<E> exceptionSupplier) throws E extends Throwable
E extends Throwable
public static <K,V> Map<K,V> mapOf(K key, V value)
public static <K,V> Map<K,V> mapOf(K key1, V value1, K key2, V value2)
public static boolean isEmpty(Iterable<?> iterable)