Package org.xmlunit.util
Class Linqy
java.lang.Object
org.xmlunit.util.Linqy
A couple of (functional) sequence processing constructs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
private static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> boolean
Determines whether a given predicate holds true for all elements.static <T> boolean
Determines whether a given predicate holds true for at least one element.static <E> List
<E> Turns the iterable into a list.static <E> Iterable
<E> Turns an iterable into its type-safe cousin.static int
Count the number of elements in a sequence.static <T> Iterable
<T> Exclude all elements from an iterable that don't match a given predicate.static <F,
T> Iterable <T> Create a new iterable by applying a mapper function to each element of a given sequence.static <E> Iterable
<E> singleton
(E single) An iterable containing a single element.
-
Constructor Details
-
Linqy
private Linqy()
-
-
Method Details
-
asList
Turns the iterable into a list. -
cast
Turns an iterable into its type-safe cousin. -
singleton
An iterable containing a single element. -
map
Create a new iterable by applying a mapper function to each element of a given sequence. -
filter
Exclude all elements from an iterable that don't match a given predicate. -
count
Count the number of elements in a sequence. -
any
Determines whether a given predicate holds true for at least one element.Returns false for an empty sequence.
-
all
Determines whether a given predicate holds true for all elements.Returns true for an empty sequence.
-