public class BLCArrayUtils extends Object
Constructor and Description |
---|
BLCArrayUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> ArrayList<T> |
asList(T[] array)
Given an input array, will return an ArrayList representation of the array.
|
static <T,O> ArrayList<T> |
collect(Object[] array,
TypedTransformer<T> transformer)
Similar to the CollectionUtils collect except that it works on an array instead of a Java Collection
|
static <T,O> HashSet<T> |
collectSet(Object[] array,
TypedTransformer<T> transformer)
The same as
collect(Object[], TypedTransformer) but returns a set. |
static <T> boolean |
contains(T[] array,
TypedPredicate<T> predicate)
Given an array and a typed predicate, determines if the array has an object that matches the condition of the
predicate.
|
public static <T> boolean contains(T[] array, TypedPredicate<T> predicate)
array
- predicate
- public static <T> ArrayList<T> asList(T[] array)
array
- public static <T,O> ArrayList<T> collect(Object[] array, TypedTransformer<T> transformer)
array
- transformer
- public static <T,O> HashSet<T> collectSet(Object[] array, TypedTransformer<T> transformer)
collect(Object[], TypedTransformer)
but returns a set.array
- transformer
- Copyright © 2022. All rights reserved.