| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.util |
| Modifier and Type | Field and Description |
|---|---|
static Osgl.Predicate |
Osgl.F.FALSE
A predefined forever FALSE predicate which always return
false for whatever element been tested |
static Osgl.Predicate |
Osgl.F.IS_NULL
|
static Osgl.Predicate<Field> |
Osgl.F.NON_STATIC_FIELD
A predicate function that when applied to a
Field type
object, returns `true` when the field is not static |
static Osgl.Predicate |
Osgl.F.NOT_NULL
A predefined
Predicate predicate test if the element
specified is NOT null |
static Osgl.Predicate |
Osgl.F.TRUE
A predefined forever true predicate which returns
true
on any element been tested |
| Modifier and Type | Method and Description |
|---|---|
static <T> Osgl.Predicate<T> |
Osgl.F.and(Collection<Osgl.Function<? super T,Boolean>> predicates)
Returns a composed
Osgl.Predicate function that for any given parameter, the test result is true
only when all of the specified predicates returns true when applied to the parameter |
Osgl.Predicate<T> |
Osgl.Predicate.and(Osgl.Function<? super T,Boolean>... predicates)
Return an
Predicate predicate from a list of Function<Boolean, T>
with AND operation. |
static <T> Osgl.Predicate<T> |
Osgl.F.and(Osgl.Function<? super T,Boolean>... predicates)
Returns a composed
Osgl.Predicate function that for any given parameter, the test result is true
only when all of the specified predicates returns true when applied to the parameter |
static <T> Osgl.Predicate<T> |
Osgl.F.any(Collection<Osgl.Function<? super T,Boolean>> predicates)
Alias of
Osgl.F.or(Collection) |
static <T> Osgl.Predicate<T> |
Osgl.F.any(Osgl.Function<? super T,Boolean>... predicates)
Alias of
Osgl.F.or(Osgl.Function[]) |
static <P> Osgl.Predicate<P> |
Osgl.F.eq(P element)
Returns a
Osgl.Predicate that checkes if the argument
equals to the element specified |
static Osgl.Predicate<Field> |
Osgl.F.fieldWithAnnotation(Class<? extends Annotation> annoClass)
Returns a predicate function that when applied to a
Field type
object, returns `true` if the field has specified annotation presented |
static <T> Osgl.Predicate<T> |
Osgl.generalPredicate(Osgl.Function<? super T,?> f)
Convert a general
Function<T, ?> typed function to
Predicate<T> function. |
static <T> Osgl.Predicate<T> |
Osgl.F.isNull()
The type-safe version of
Osgl.F.IS_NULL |
static <T> Osgl.Predicate<T> |
Osgl.F.isNull(Class<T> c)
The type-safe version of
Osgl.F.IS_NULL |
Osgl.Predicate<T> |
Osgl.Predicate.negate()
Returns a negate function of this
|
static <T> Osgl.Predicate<T> |
Osgl.F.negate(Osgl.Function<? super T,Boolean> predicate)
Returns a negate function of the specified predicate function that applied to 1 params and
returns boolean value
|
static <T> Osgl.Predicate<T> |
Osgl.Predicate.negate(Osgl.Function<T,Boolean> predicate) |
static <T> Osgl.Predicate<T> |
Osgl.F.no()
A type-safe version of
Osgl.F.FALSE |
static <T> Osgl.Predicate<T> |
Osgl.F.none(Collection<Osgl.Function<? super T,Boolean>> predicates)
Negation of
Osgl.F.or(Collection) |
static <T> Osgl.Predicate<T> |
Osgl.F.none(Osgl.Function<? super T,Boolean>... predicates)
Negation of
Osgl.F.or(Osgl.Function[]) |
static <T> Osgl.Predicate<T> |
Osgl.F.notNull()
The type-safe version of
Osgl.F.NOT_NULL |
static <T> Osgl.Predicate<T> |
Osgl.F.or(Collection<Osgl.Function<? super T,Boolean>> predicates)
Returns a composed
Osgl.Predicate function that for any given parameter, the test result is true
only when any one of the specified predicates returns true when applied to the parameter |
Osgl.Predicate<T> |
Osgl.Predicate.or(Osgl.Function<? super T,Boolean>... predicates)
Return an
Predicate predicate from a list of Function<Boolean, T>
with OR operation. |
static <T> Osgl.Predicate<T> |
Osgl.F.or(Osgl.Function<? super T,Boolean>... predicates)
Returns a composed
Osgl.Predicate function that for any given parameter, the test result is true
when any one of the specified predicates returns true on the parameter |
static <T> Osgl.Predicate<T> |
Osgl.predicate(Osgl.Function<? super T,Boolean> f)
Convert a
Function<T, Boolean> typed function to
Predicate<T> function. |
static <T> Osgl.Predicate<T> |
Osgl.F.yes()
A type-safe version of
Osgl.F.TRUE |
| Modifier and Type | Field and Description |
|---|---|
static Osgl.Predicate<String> |
S.F.IS_BLANK |
static Osgl.Predicate<String> |
S.F.IS_EMPTY |
static Osgl.Predicate<Integer> |
N.F.IS_EVEN |
static Osgl.Predicate<Integer> |
N.F.IS_ODD |
static Osgl.Predicate<String> |
S.F.NOT_EMPTY |
| Modifier and Type | Method and Description |
|---|---|
static <T> Osgl.Predicate<Collection<? super T>> |
C.F.add(T element)
Returns a function that add the specified element into the argument collection and
return
true if add successfully or false otherwise |
static <T> Osgl.Predicate<Collection<? super T>> |
C.F.addAll(Collection<? extends T> source)
Returns a function that add all elements in the source collection specified into the destination
collection as argument.
|
static <T> Osgl.Predicate<C.List<? super T>> |
C.F.addAll(int index,
Collection<? extends T> source)
Returns a function that add all elements from the source collection specified into the argument list at
the position specified
|
static <T> Osgl.Predicate<Iterable<? extends T>> |
C.F.addAllTo(Collection<? super T> destination)
Returns a function that takes argument of type
Collection and add all elements inside
into the specified collection. |
static <T> Osgl.Predicate<Collection<? extends T>> |
C.F.addAllTo(int index,
C.List<? super T> destination)
Returns a function that add all elements from the argument collection into the destination list specified
at the position specified
|
static <T> Osgl.Predicate<T> |
C.F.addTo(Collection<? super T> destination)
Returns a function that add the argument to a collection specified and returns
true if added successfully or false otherwise |
static <T> Osgl.Predicate<Collection<? extends T>> |
C.F.allContainsIn(Collection<? super T> collection)
Returns a predicate function that check if all element in the argument (a collection) contained
in the collection specified
|
static Osgl.Predicate<String> |
S.F.contains(String search) |
static <T> Osgl.Predicate<Collection<? super T>> |
C.F.contains(T element)
Returns a predicate function that check if the argument (collection) contains the
element specified
|
static <T> Osgl.Predicate<Collection<? super T>> |
C.F.containsAll(Collection<? extends T> collection)
Returns a predicate function that check if all element in the collection specified are contained in
the argument collection
|
static <T> Osgl.Predicate<T> |
C.F.containsIn(Collection<? super T> collection)
Returns a predicate function that check if the argument is contained in
the collection specified
|
static Osgl.Predicate<String> |
S.F.endsWith(String suffix) |
static Osgl.Predicate<Integer> |
N.F.greaterThan(int n) |
static Osgl.Predicate<Integer> |
N.F.greaterThanOrEqualsTo(int n) |
static Osgl.Predicate<Integer> |
N.F.gt(int n) |
static Osgl.Predicate<Integer> |
N.F.gte(int n) |
static Osgl.Predicate<Integer> |
N.F.lessThan(int n) |
static Osgl.Predicate<Integer> |
N.F.lessThanOrEqualsTo(int n) |
static Osgl.Predicate<Integer> |
N.F.lt(int n) |
static Osgl.Predicate<Integer> |
N.F.lte(int n) |
static <T> Osgl.Predicate<Collection<? super T>> |
C.F.remove(T toBeRemoved)
Returns a function that remove the element specified from the argument collection.
|
static <T> Osgl.Predicate<Collection<? super T>> |
C.F.removeAll(Collection<? extends T> source)
Returns a function that remove all elements in the
source collection from the
argument collection. |
static <T> Osgl.Predicate<Collection<? extends T>> |
C.F.removeAllFrom(Collection<? super T> fromCollection)
Returns a function that remove all elements in the argument collection from
the
fromCollection specified. |
static <T> Osgl.Predicate<T> |
C.F.removeFrom(Collection<? super T> collection)
Returns a function that remove the argument from a collection specified.
|
static <T> Osgl.Predicate<Collection<? super T>> |
C.F.retainAll(Collection<? extends T> collection)
Returns a function that retains only elements contained in the specified collection in
the argument collection.
|
static <T> Osgl.Predicate<Collection<? extends T>> |
C.F.retainAllIn(Collection<? super T> collection)
Returns a function that retains only elements contained in the argument collection in the
collection specified.
|
static Osgl.Predicate<String> |
S.F.startsWith(String prefix) |
Copyright © 2017. All Rights Reserved.