Inheritance
System.Object
CollectionUtils
public static class CollectionUtils
Methods
Declaration
public static T[] array<T>(this List<T> list)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<T> |
list |
|
Returns
Type Parameters
Declaration
public static bool equalsList<T>(this IList<T> it, IList<T> list)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<T> |
it |
|
System.Collections.Generic.IList<T> |
list |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Declaration
public static T first<T>(this IList<T> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<T> |
it |
|
Returns
Type Parameters
Declaration
public static TValue getOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> it, TKey key)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<TKey, TValue> |
it |
|
TKey |
key |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
Declaration
public static int hashList<T>(this IList<T> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<T> |
it |
|
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
Declaration
public static bool isEmpty(this string it)
Parameters
Type |
Name |
Description |
System.String |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static bool isEmpty<T>(this Queue<T> it)
Parameters
Type |
Name |
Description |
Queue<T> |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Declaration
public static bool isEmpty<T>(this ICollection<T> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.ICollection<T> |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Declaration
public static bool isEmpty<TKey, TValue>(this IDictionary<TKey, TValue> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<TKey, TValue> |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
Declaration
public static bool isNotEmpty(this string it)
Parameters
Type |
Name |
Description |
System.String |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static bool isNotEmpty<T>(this Queue<T> it)
Parameters
Type |
Name |
Description |
Queue<T> |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Declaration
public static bool isNotEmpty<T>(this ICollection<T> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.ICollection<T> |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Declaration
public static bool isNotEmpty<TKey, TValue>(this IDictionary<TKey, TValue> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<TKey, TValue> |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
Declaration
public static T last<T>(this IList<T> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<T> |
it |
|
Returns
Type Parameters
Declaration
public static V putIfAbsent<K, V>(this IDictionary<K, V> it, K key, Func<V> ifAbsent)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<K, V> |
it |
|
K |
key |
|
System.Func<V> |
ifAbsent |
|
Returns
Type Parameters
Declaration
public static T refAt<T>(this List<T> list, int index)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<T> |
list |
|
System.Int32 |
index |
|
Returns
Type Parameters
Declaration
public static T removeLast<T>(this IList<T> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<T> |
it |
|
Returns
Type Parameters
Declaration
public static void reset<T>(this List<T> list, int size)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<T> |
list |
|
System.Int32 |
size |
|
Type Parameters
Declaration
public static string toStringList<T>(this IList<T> it)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<T> |
it |
|
Returns
Type |
Description |
System.String |
|
Type Parameters