public class ArrayUtils extends Object
Utility class for ArrayList processing.
Modifier and Type | Method and Description |
---|---|
static void |
apply(List array,
IAlgorithm algorithm,
int startIndex)
Apply algorithm for each List element starting from specified position.
|
static <T> T[] |
concat(Class<T> typeOfT,
T[]... arrays) |
static List |
filter(List array,
ICondition cond)
Filter ArrayList elements by specified condition.
|
static Object |
find(List array,
ICondition cond)
Find first occurrence of an ArrayList element which satisfy specified condition.
|
public static <T> T[] concat(Class<T> typeOfT, T[]... arrays)
public static void apply(List array, IAlgorithm algorithm, int startIndex)
Apply algorithm for each List element starting from specified position.
array
- ArrayList to process.algorithm
- Applied algorithm.startIndex
- Start element position.public static List filter(List array, ICondition cond)
Filter ArrayList elements by specified condition.
array
- List to process.cond
- Condition used to filter List.public static Object find(List array, ICondition cond)
Find first occurrence of an ArrayList element which satisfy specified condition.
array
- ArrayList to process.cond
- Condition used to find ArrayList element.