Package | Description |
---|---|
no.motif | |
no.motif.f | |
no.motif.f.base | |
no.motif.f.combine | |
no.motif.iter | |
no.motif.iter.ordering | |
no.motif.single | |
no.motif.types |
Modifier and Type | Field and Description |
---|---|
static Predicate<String> |
Strings.alphabetic
Alphabetic strings are at least one character, and all
letters . |
static Predicate<String> |
Strings.alphanumeric
|
static Predicate<String> |
Strings.blank
A blank string is either
null , empty, or
all characters are whitespace . |
static Predicate<Character> |
Chars.digit
Determines if a character is a digit.
|
static Predicate<Iterable<?>> |
Iterate.empty
Evaluates if an
Iterable is empty. |
static Predicate<Long> |
Longs.even |
static Predicate<Integer> |
Ints.even |
static Predicate<Iterator<?>> |
Iterate.hasNext
The
Iterator.hasNext() method as a function. |
static Predicate<Object> |
Base.isNull
Yields
true for null values. |
static Predicate<Character> |
Chars.letter
Determines if a character is a letter.
|
static Predicate<Character> |
Chars.letterOrDigit
Determines if a character is a letter or a digit.
|
static Predicate<String> |
Strings.nonblank
A nonblank string has at least one character, and must contain at least
one character which is
not whitespace . |
static Predicate<Object> |
Base.notNull
Yields
true for all non-null values. |
static Predicate<String> |
Strings.numeric
A numeric string must have at least one character, and all of them
must be
digits . |
static Predicate<Long> |
Longs.odd |
static Predicate<Integer> |
Ints.odd |
static Predicate<Character> |
Chars.whitespace
Determines if a character is whitespace.
|
Modifier and Type | Method and Description |
---|---|
static <E,I extends Iterable<E>> |
Base.all(Predicate<? super E> predicate)
Evaluate if all elements satisfies a predicate, i.e.
|
static Predicate<String> |
Strings.allChars(Predicate<Character> valid)
Predicate verifying that all characters in a string satifies a given predicate.
|
static <T> Predicate<T> |
Base.always(boolean bool)
Create a predicate which always yields the given
boolean value. |
static Predicate<AnnotatedElement> |
Reflect.annotatedWith(Class<? extends Annotation> annotation)
Check if an element (class, method, field, etc) is annotated with a given annotation.
|
static <T> Predicate<T> |
Base.containedIn(Iterable<? extends T> iterable)
Evaluates if objects are contained in the given
Iterable . |
static Predicate<String> |
Strings.contains(CharSequence charSequence)
Determines if a substring is present in a string.
|
static Predicate<String> |
Strings.endsWith(String suffix)
Determines if a string ends with a given suffix string.
|
static <T extends Comparable<? super T>> |
Base.equalOrGreaterThan(T value)
Predicate evaluating if values are equal to or greater than a given value.
|
static <T extends Comparable<? super T>> |
Base.equalOrLessThan(T value)
Predicate evaluating if values are equal to or less than a given value.
|
static <T> Predicate<T> |
Base.equalTo(Fn0<? super T> value)
Equality predicate, checks if values are equal to the value computed from the given
Fn0 . |
static <T> Predicate<T> |
Base.equalTo(T value)
Equality predicate, checks if values are equal to the given value.
|
static <E,I extends Iterable<E>> |
Base.exists(E element)
Shorthand for
exists( equalTo(element)) |
static <E,I extends Iterable<E>> |
Base.exists(Predicate<? super E> element)
Evaluate if an element exists, i.e.
|
static <T extends Comparable<? super T>> |
Base.greaterThan(T value)
Predicate evaluating if values are greater than a given value.
|
static Predicate<String> |
Strings.hasLength(int exactLength)
Evaluate if strings are of a exact length.
|
static Predicate<String> |
Strings.hasLength(Predicate<? super Integer> accepted)
Evaluate if strings have accepted lengths.
|
static <T> Predicate<T> |
Base.is(T value)
A synonym for
Base.equalTo(Object) . |
static Predicate<Object> |
Reflect.isA(Class<?> type)
Evaluates if objects are of a certain type (class or interface).
|
static <K> Predicate<K> |
Maps.keyIn(Map<K,?> map)
Evaluate if objects are a key
contained in
the given Map . |
static <T extends Comparable<? super T>> |
Base.lessThan(T value)
Predicate evaluating if values are less than a given value.
|
static Predicate<String> |
Strings.matches(String regex)
Does a
regular expression match on strings. |
static Predicate<String> |
Strings.nonblankAllChars(Predicate<Character> valid)
Predicate verifying that strings are
not blank and
each char satisfies a given predicate. |
static <T> Predicate<T> |
Base.not(Predicate<T> p)
Negates a predicate.
|
static <T> Predicate<T> |
Base.not(T o)
Shorthand for
not( equalTo(o)) . |
static Predicate<String> |
Strings.startsWith(String prefix)
Determines if a string starts with a given prefix string.
|
static <V> Predicate<V> |
Maps.valueIn(Map<?,? extends V> map)
Evaluate if objects are a value
contained in
the given Map . |
static <T,P> Predicate<T> |
Base.where(Fn<T,P> fn,
Predicate<? super P> predicate)
Compose a predicate from taking the result of a function and apply it to
another predicate.
|
Modifier and Type | Method and Description |
---|---|
static <E,I extends Iterable<E>> |
Base.all(Predicate<? super E> predicate)
Evaluate if all elements satisfies a predicate, i.e.
|
static Predicate<String> |
Strings.allChars(Predicate<Character> valid)
Predicate verifying that all characters in a string satifies a given predicate.
|
static <T> Conjunction<T> |
Base.allOf(Predicate<? super T>... predicates)
Compose an AND-expression of several predicates.
|
static <T> Disjunction<T> |
Base.anyOf(Predicate<? super T>... predicates)
Compose an OR-expression of several predicates.
|
static <T> Conjunction<T> |
Base.both(Predicate<T> predicate)
Create a AND-expression of several predicates, starting with the one
given to this method.
|
static <T> Disjunction<T> |
Base.either(Predicate<T> predicate)
Create a OR-expression of several predicates, starting with the one
given to this method.
|
static <E,I extends Iterable<E>> |
Base.exists(Predicate<? super E> element)
Evaluate if an element exists, i.e.
|
static Predicate<String> |
Strings.hasLength(Predicate<? super Integer> accepted)
Evaluate if strings have accepted lengths.
|
static Predicate<String> |
Strings.nonblankAllChars(Predicate<Character> valid)
Predicate verifying that strings are
not blank and
each char satisfies a given predicate. |
static <T> Predicate<T> |
Base.not(Predicate<T> p)
Negates a predicate.
|
static <V> Optional<V> |
Singular.optional(Predicate<? super V> isPresent,
V value)
Wrap an object in an
Optional , using a predicate to
determine if the value should be treated as defined. |
static Fn<String,Iterable<String>> |
Strings.splittingOn(Predicate<? super Character> character)
Split a string into several on any character passing the given
Character predicate. |
static <I,O> When<I,O> |
Base.when(Predicate<? super I> condition,
Fn<? super I,? extends O> fn)
|
static <T,P> Predicate<T> |
Base.where(Fn<T,P> fn,
Predicate<? super P> predicate)
Compose a predicate from taking the result of a function and apply it to
another predicate.
|
Modifier and Type | Class and Description |
---|---|
static class |
Predicate.Always<T> |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Predicate.Always.no() |
static <T> Predicate<T> |
Predicate.Always.yes() |
Modifier and Type | Class and Description |
---|---|
class |
FalseIfNull<T>
A base implementation for predicates where the case of
null
values is evaluated as false. |
Modifier and Type | Class and Description |
---|---|
class |
Conjunction<T>
A conjunction is a composition of several predicates which must all evaluate
to true for the conjunction to be true, otherwise it is false.
|
class |
Disjunction<T>
A disjunction is a composition of several predicates which evaluates
to true when at least one of the predicates yields true.
|
class |
Where<T,P> |
Modifier and Type | Method and Description |
---|---|
Conjunction<T> |
Conjunction.and(Predicate<? super T> anotherPredicate) |
Disjunction<T> |
Disjunction.or(Predicate<? super T> otherPredicate) |
Constructor and Description |
---|
Conjunction(Predicate<? super T>... predicates) |
Disjunction(Predicate<? super T>... predicates) |
When(Predicate<? super I> condition,
Fn<? super I,? extends O> fn) |
Where(Fn<T,P> fn,
Predicate<? super P> predicate) |
Constructor and Description |
---|
Conjunction(Iterable<Predicate<? super T>> predicates) |
Disjunction(Iterable<Predicate<? super T>> predicates) |
Modifier and Type | Method and Description |
---|---|
PreparedIterable<T> |
PreparedIterable.filter(Predicate<? super T> filter) |
PreparedIterable<T> |
PreparedIterable.takeUntil(Predicate<? super T> predicate) |
PreparedIterable<T> |
PreparedIterable.takeWhile(Predicate<? super T> predicate) |
Constructor and Description |
---|
SplitOnCharacter(String string,
Predicate<? super Character> splittingCharacter) |
Modifier and Type | Method and Description |
---|---|
EnhancedComparator<T> |
EnhancedComparatorImpl.first(Predicate<? super T> prioritized) |
EnhancedComparator<T> |
EnhancedComparator.first(Predicate<? super T> prioritized) |
EnhancedComparator<T> |
EnhancedComparatorImpl.last(Predicate<? super T> last) |
EnhancedComparator<T> |
EnhancedComparator.last(Predicate<? super T> last) |
Modifier and Type | Method and Description |
---|---|
abstract Optional<V> |
Optional.filter(Predicate<? super V> filter) |
Optional<V> |
Optional.Some.filter(Predicate<? super V> accepted) |
Optional<V> |
Optional.None.filter(Predicate<? super V> filter) |
Optional<V> |
A.filter(Predicate<? super V> filter) |
abstract <O> Optional<O> |
Optional.map(Predicate<? super O> isPresent,
Fn<? super V,O> mapper)
Map this
Optional to another type of Optional . |
<O> Optional<O> |
Optional.Some.map(Predicate<? super O> isPresent,
Fn<? super V,O> mapper) |
<O> Optional<O> |
Optional.None.map(Predicate<? super O> isPresent,
Fn<? super V,O> mapper) |
<O> Optional<O> |
A.map(Predicate<? super O> isPresent,
Fn<? super V,O> mapper)
Map the value to another value.
|
static <V> Optional<V> |
Optional.resolve(Predicate<? super V> isPresent,
V value)
*** Not part of the public API! ***
|
Modifier and Type | Method and Description |
---|---|
boolean |
Existance.exists(Predicate<? super T> predicate)
Decide if an element exist.
|
Filterable<T> |
Filterable.filter(Predicate<? super T> filter)
Provide a predicate that evaluates which element(s) to be
included.
|
Elements<T> |
Elements.filter(Predicate<? super T> filter) |
Elements<T> |
Elements.takeUntil(Predicate<? super T> predicate)
Take elements until a given predicate evaluates to true.
|
Elements<T> |
Elements.takeWhile(Predicate<? super T> predicate)
Take elements as long as a given predicate
evaluates to true.
|
Copyright © 2016. All Rights Reserved.