Package com.strobel.core
Class CollectionUtilities
java.lang.Object
com.strobel.core.CollectionUtilities
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static final class
private static final class
private static final class
private static final class
private static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> boolean
static <T> boolean
static <T> boolean
static <T> boolean
static <T> T
static <T> T
static <T> T
static <T> int
firstIndexWhere
(Iterable<T> collection, Predicate<T> predicate) static <T> T
firstOrDefault
(Iterable<T> collection) static <T> T
firstOrDefault
(Iterable<T> collection, Predicate<T> predicate) static <T> T
static <T> T
static <T> T
getOrDefault
(Iterable<T> collection, int index) static <T> T
getOrDefault
(List<T> collection, int index) static int
static int
static <T> int
static <T> int
indexOfByIdentity
(Iterable<?> collection, T item) static <T> int
indexOfByIdentity
(List<?> collection, T item) static <T> T
static <T> T
static <T> T
static <T> int
lastIndexWhere
(Iterable<T> collection, Predicate<T> predicate) static <T> T
lastOrDefault
(Iterable<T> collection) static <T> T
lastOrDefault
(Iterable<T> collection, Predicate<T> predicate) static <T,
R> Iterable <R> static <V,
K> void static <T,
R> Iterable <R> static <T> boolean
sequenceDeepEquals
(Iterable<? extends T> first, Iterable<? extends T> second) static <T> boolean
sequenceDeepEquals
(List<? extends T> first, List<? extends T> second) private static boolean
sequenceDeepEqualsCore
(Object first, Object second) static <T> boolean
sequenceEquals
(Iterable<? extends T> first, Iterable<? extends T> second) static <T> boolean
sequenceEquals
(List<? extends T> first, List<? extends T> second) static <T> T
static <T> T
static <T> T
singleOrDefault
(Iterable<T> collection) static <T> T
singleOrDefault
(List<T> list) static <T> Iterable
<T> static <T> Iterable
<T> static <T> Iterable
<T> static <T> Iterable
<T> static <E> E[]
static <T> List
<T> static <T> List
<T> toList
(Enumeration<T> collection) static <T> Iterable
<T>
-
Field Details
-
IDENTITY_MAP_SUPPLIER
-
HASH_MAP_SUPPLIER
-
LINKED_HASH_MAP_SUPPLIER
-
LIST_SUPPLIER
-
SET_SUPPLIER
-
-
Constructor Details
-
CollectionUtilities
public CollectionUtilities()
-
-
Method Details
-
setFactory
-
listFactory
-
hashMapFactory
-
linekdHashMapFactory
-
identityMapFactory
-
indexOfByIdentity
-
indexOfByIdentity
-
indexOf
-
toList
-
toList
-
getOrDefault
-
getOrDefault
-
get
-
get
-
single
-
singleOrDefault
-
single
-
first
-
first
-
singleOrDefault
-
ofType
-
firstOrDefault
-
first
-
firstOrDefault
-
last
-
last
-
lastOrDefault
-
firstIndexWhere
-
lastIndexWhere
-
last
-
lastOrDefault
-
contains
-
any
-
skip
-
skipWhile
-
take
-
takeWhile
-
any
-
all
-
where
-
select
-
hashCode
-
hashCode
-
sequenceEquals
-
sequenceEquals
-
sequenceDeepEquals
-
sequenceDeepEquals
-
sequenceDeepEqualsCore
-
toArray
-
removeAll
-