public class CollectionExtensions extends Object
The collection extensions.
Constructor and Description |
---|
CollectionExtensions() |
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
All(Iterable<T> collection,
com.aspose.ms.System.Predicate<T> predicate) |
static <T> boolean |
Any(Iterable<T> collection) |
static <T> boolean |
Any(Iterable<T> collection,
com.aspose.ms.System.Predicate<T> predicate) |
static <T> boolean |
ArrayContains(T[] array,
T element) |
static <T> boolean |
bagsEqual(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<T> a1,
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<T> a2)
The equals.
|
static <TSource,TResult> |
cast(Iterable<TSource> source,
Class<TResult> cls) |
static byte[] |
ConcatByteArrays(byte[]... arrays) |
static <TSource> int |
count(Iterable<TSource> source) |
static <TSource> int |
count(Iterable<TSource> source,
com.aspose.ms.System.Predicate<TSource> predicate) |
static byte[] |
createArray(byte initialVal,
int length) |
static <T> T[] |
createArray(Class<T> cls,
T initialVal,
int length) |
static <TSource> TSource |
elementAt(Iterable<TSource> source,
int index) |
static boolean |
equals(com.aspose.ms.System.Collections.BitArray a1,
com.aspose.ms.System.Collections.BitArray a2)
The equals.
|
static boolean |
equals(byte[] a1,
byte[] a2)
The equals.
|
static <T> boolean |
equals(com.aspose.ms.System.Collections.Generic.IGenericCollection<T> a1,
com.aspose.ms.System.Collections.Generic.IGenericCollection<T> a2)
The equals.
|
static boolean |
equals(int[] a1,
int[] a2)
The equals.
|
static <TSource> TSource |
first(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source)
Returns first element of the sequence, or default value if wasn't found.
|
static <TSource> TSource |
firstOrDefault(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source)
Returns first element of the sequence, or default value if wasn't found.
|
static <TSource> TSource |
firstOrDefault(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source,
com.aspose.ms.System.Predicate<TSource> predicate)
Returns first element of the sequence, or default value if wasn't found.
|
static <TSource> int |
indexOf(com.aspose.ms.System.Collections.Generic.IGenericList<TSource> source,
com.aspose.ms.System.Predicate<TSource> predicate)
The index of method.
|
static <T> Iterable<T> |
intersect(Iterable<T> a1,
Iterable<T> a2) |
static <TSource> TSource |
last(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source) |
static <TSource> TSource |
last(Iterable<TSource> source) |
static <TResult> com.aspose.ms.System.Collections.Generic.List<TResult> |
ofType(Class<TResult> typeParameterClass,
Iterable enumerable)
Returns new enumerable, which contains only an elements of the specified type.
|
static <T> T[] |
ToArray(Class<T> cls,
Iterable<T> collection) |
static <T> ArrayList<T> |
ToArrayList(Iterable<T> iterable) |
static byte[] |
ToByteArray(com.aspose.ms.System.Collections.Generic.IGenericList<Byte> byteList) |
static int[] |
ToIntArray(com.aspose.ms.System.Collections.Generic.IGenericList<Integer> byteList) |
static String |
toString(byte[] buffer) |
static <TKey,TValue> |
tryInvertDictionary(com.aspose.ms.System.Collections.Generic.IGenericDictionary<TKey,TValue> originalDictionary,
com.aspose.ms.System.Collections.Generic.IGenericDictionary<TValue,TKey>[] invertedDictionary) |
static <TSource> com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> |
where(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source,
com.aspose.ms.System.Predicate<TSource> predicate)
Gets a filtered enumerable according to a specified predicate.
|
static <TSource> Iterable<TSource> |
where(Iterable<TSource> source,
com.aspose.ms.System.Predicate<TSource> predicate)
Gets a filtered enumerable according to a specified predicate.
|
public static <T> boolean equals(com.aspose.ms.System.Collections.Generic.IGenericCollection<T> a1, com.aspose.ms.System.Collections.Generic.IGenericCollection<T> a2)
The equals.
a1
- The a 1.a2
- The a 2.
T
:
bool
.public static byte[] ConcatByteArrays(byte[]... arrays)
public static byte[] ToByteArray(com.aspose.ms.System.Collections.Generic.IGenericList<Byte> byteList)
public static int[] ToIntArray(com.aspose.ms.System.Collections.Generic.IGenericList<Integer> byteList)
public static <T> boolean ArrayContains(T[] array, T element)
public static <T> boolean All(Iterable<T> collection, com.aspose.ms.System.Predicate<T> predicate)
public static <T> boolean Any(Iterable<T> collection)
public static <T> boolean Any(Iterable<T> collection, com.aspose.ms.System.Predicate<T> predicate)
public static <T> boolean bagsEqual(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<T> a1, com.aspose.ms.System.Collections.Generic.IGenericEnumerable<T> a2)
The equals.
a1
- The a 1.a2
- The a 2.
T
:
bool
.public static boolean equals(com.aspose.ms.System.Collections.BitArray a1, com.aspose.ms.System.Collections.BitArray a2)
The equals.
a1
- The a 1.a2
- The a 2.bool
.public static boolean equals(int[] a1, int[] a2)
The equals.
a1
- The a 1.a2
- The a 2.bool
.public static boolean equals(byte[] a1, byte[] a2)
The equals.
a1
- The a 1.a2
- The a 2.bool
.public static <TResult> com.aspose.ms.System.Collections.Generic.List<TResult> ofType(Class<TResult> typeParameterClass, Iterable enumerable)
Returns new enumerable, which contains only an elements of the specified type.
public static <TSource> Iterable<TSource> where(Iterable<TSource> source, com.aspose.ms.System.Predicate<TSource> predicate)
Gets a filtered enumerable according to a specified predicate.
public static <TSource> com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> where(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source, com.aspose.ms.System.Predicate<TSource> predicate)
Gets a filtered enumerable according to a specified predicate.
public static <TSource> TSource first(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source)
Returns first element of the sequence, or default value if wasn't found.
public static <TSource> TSource firstOrDefault(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source)
Returns first element of the sequence, or default value if wasn't found.
public static <TSource> TSource firstOrDefault(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source, com.aspose.ms.System.Predicate<TSource> predicate)
Returns first element of the sequence, or default value if wasn't found.
public static <TSource> int indexOf(com.aspose.ms.System.Collections.Generic.IGenericList<TSource> source, com.aspose.ms.System.Predicate<TSource> predicate)
The index of method.
public static <TSource> TSource last(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TSource> source)
public static <TSource> TSource last(Iterable<TSource> source)
public static <TSource> TSource elementAt(Iterable<TSource> source, int index)
public static <TKey,TValue> boolean tryInvertDictionary(com.aspose.ms.System.Collections.Generic.IGenericDictionary<TKey,TValue> originalDictionary, com.aspose.ms.System.Collections.Generic.IGenericDictionary<TValue,TKey>[] invertedDictionary)
public static <TSource> int count(Iterable<TSource> source)
public static <TSource> int count(Iterable<TSource> source, com.aspose.ms.System.Predicate<TSource> predicate)
public static <TSource,TResult> Iterable<TResult> cast(Iterable<TSource> source, Class<TResult> cls)
public static <T> T[] createArray(Class<T> cls, T initialVal, int length)
public static byte[] createArray(byte initialVal, int length)
public static String toString(byte[] buffer)
Copyright (c) 2017 Aspose. All Rights Reserved.