Package com.linkedin.alpini.base.misc
Enum CollectionUtil
- java.lang.Object
-
- java.lang.Enum<CollectionUtil>
-
- com.linkedin.alpini.base.misc.CollectionUtil
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CollectionUtil>
public enum CollectionUtil extends java.lang.Enum<CollectionUtil>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description SINGLETON
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
applyFactoryModifiers(T pipelineFactory, java.util.List<java.util.function.Function<T,T>> modifiers)
static boolean
isNotEmpty(java.util.Collection<?> collection)
static <T> java.util.List<T>
listOf(java.util.Collection<T> values)
static <T> java.util.List<T>
listOf(T value)
static <T> java.util.List<T>
listOf(T... values)
static <K,V>
java.util.Map<K,V>mapOf(K key, V value)
static <T> java.util.Set<T>
setOf(T... values)
static <T> java.util.stream.Stream<T>
stream(java.util.Iterator<? extends T> iterator)
static CollectionUtil
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CollectionUtil[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SINGLETON
public static final CollectionUtil SINGLETON
-
-
Method Detail
-
values
public static CollectionUtil[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CollectionUtil c : CollectionUtil.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CollectionUtil valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isNotEmpty
public static boolean isNotEmpty(java.util.Collection<?> collection)
-
setOf
@SafeVarargs public static <T> java.util.Set<T> setOf(T... values)
-
listOf
public static <T> java.util.List<T> listOf(T value)
-
listOf
@SafeVarargs public static <T> java.util.List<T> listOf(T... values)
-
listOf
public static <T> java.util.List<T> listOf(java.util.Collection<T> values)
-
mapOf
public static <K,V> java.util.Map<K,V> mapOf(K key, V value)
-
stream
public static <T> java.util.stream.Stream<T> stream(java.util.Iterator<? extends T> iterator)
-
applyFactoryModifiers
public static <T> T applyFactoryModifiers(T pipelineFactory, java.util.List<java.util.function.Function<T,T>> modifiers)
-
-