public class MCollection extends Object
MCollection class.
| Constructor and Description |
|---|
MCollection() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T[] |
append(T[] array,
T... newElements)
append.
|
static boolean |
contains(Object[] array,
Object item)
Returns true of array is not null and the value of item is included in
the array.
|
static <T> void |
copyArray(T[] array,
Collection<T> list)
Fills a list at the end with the values of an array, ignoring null values.
|
static int[] |
fillIntArray(int from,
int to)
fillIntArray.
|
static int[] |
order(int[] array,
boolean unique)
order.
|
static long[] |
order(long[] array,
boolean unique)
order.
|
static <T> void |
removeDuplicates(List<T> list)
remove duplicated entries
|
static <T> void |
removeDuplicates(List<T> list,
Comparator<T> comparator)
remove duplicated entries, Attention exponential runtime behavior !!!
Running from beginning to the end, the first element will be left, following removed.
|
static <T> List<T> |
toList(T[] array)
toList.
|
static Map<String,String> |
toStringMap(IProperties in,
boolean ignoreNull)
toStringMap.
|
static Map<String,String> |
toStringMap(Map<Object,Object> in,
boolean ignoreNull)
toStringMap.
|
public static boolean contains(Object[] array, Object item)
public static <T> void copyArray(T[] array,
Collection<T> list)
T - a T object.array - an array of T objects.list - a Collection object.public static <T> void removeDuplicates(List<T> list)
T - a T object.list - a List object.public static <T> void removeDuplicates(List<T> list, Comparator<T> comparator)
T - a T object.list - a List object.comparator - a Comparator object.@SafeVarargs public static <T> T[] append(T[] array, T... newElements)
append.
T - a T object.array - an array of T objects.newElements - a T object.public static int[] order(int[] array,
boolean unique)
order.
array - an array of int.unique - a boolean.public static long[] order(long[] array,
boolean unique)
order.
array - an array of long.unique - a boolean.public static int[] fillIntArray(int from,
int to)
fillIntArray.
from - a int.to - a int.public static Map<String,String> toStringMap(Map<Object,Object> in, boolean ignoreNull)
toStringMap.
public static Map<String,String> toStringMap(IProperties in, boolean ignoreNull)
toStringMap.
in - a IProperties object.ignoreNull - a boolean.Map object.Copyright © 2016. All Rights Reserved.