| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.util |
| Modifier and Type | Field and Description |
|---|---|
static Lang.Predicate |
Lang.F.FALSE
A predefined forever FALSE predicate which always return
false for whatever element been tested |
static Lang.Predicate |
Lang.F.IS_NULL
|
static Lang.Predicate<Field> |
Lang.F.NON_STATIC_FIELD
A predicate function that when applied to a
Field type object, returns true when the field is not static |
static Lang.Predicate |
Lang.F.NOT_NULL
A predefined
Predicate predicate test if the element specified is NOT null |
static Lang.Predicate |
Lang.F.TRUE
A predefined forever true predicate which returns
true on any element been tested |
| Modifier and Type | Method and Description |
|---|---|
static <T> Lang.Predicate<T> |
Lang.F.and(Collection<Lang.Function<? super T,Boolean>> predicates)
Returns a composed
Lang.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 |
Lang.Predicate<T> |
Lang.Predicate.and(Lang.Function<? super T,Boolean>... predicates)
Return an
Predicate predicate from a list of Function<Boolean, T> with AND operation. |
static <T> Lang.Predicate<T> |
Lang.F.and(Lang.Function<? super T,Boolean>... predicates)
Returns a composed
Lang.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> Lang.Predicate<T> |
Lang.F.any(Collection<Lang.Function<? super T,Boolean>> predicates)
Alias of
Lang.F.or(Collection) |
static <T> Lang.Predicate<T> |
Lang.F.any(Lang.Function<? super T,Boolean>... predicates)
Alias of
#or(Function[]) |
static Lang.Predicate<Readable> |
OsglConfig.binaryDataProbe() |
static <P> Lang.Predicate<P> |
Lang.F.eq(P element)
Returns a
Lang.Predicate that checkes if the argument equals to the element specified |
static Lang.Predicate<Field> |
Lang.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> Lang.Predicate<T> |
Lang.generalPredicate(Lang.Visitor<? super T> f)
Convert a general
Function<T, ?> typed function to Predicate<T> function. |
static <T> Lang.Predicate<T> |
Lang.F.isNull()
The type-safe version of
Lang.F.IS_NULL |
static <T> Lang.Predicate<T> |
Lang.F.isNull(Class<T> c)
The type-safe version of
Lang.F.IS_NULL |
Lang.Predicate<T> |
Lang.Predicate.negate()
Returns a negate function of this
|
static <T> Lang.Predicate<T> |
Lang.F.negate(Lang.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> Lang.Predicate<T> |
Lang.Predicate.negate(Lang.Function<T,Boolean> predicate) |
static <T> Lang.Predicate<T> |
Lang.F.no()
A type-safe version of
Lang.F.FALSE |
static <T> Lang.Predicate<T> |
Lang.F.none(Collection<Lang.Function<? super T,Boolean>> predicates)
Negation of
Lang.F.or(Collection) |
static <T> Lang.Predicate<T> |
Lang.F.none(Lang.Function<? super T,Boolean>... predicates)
Negation of
#or(Function[]) |
static <T> Lang.Predicate<T> |
Lang.F.or(Collection<Lang.Function<? super T,Boolean>> predicates)
Returns a composed
Lang.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 |
Lang.Predicate<T> |
Lang.Predicate.or(Lang.Function<? super T,Boolean>... predicates)
Return an
Predicate predicate from a list of Function<Boolean, T> with OR operation. |
static <T> Lang.Predicate<T> |
Lang.F.or(Lang.Function<? super T,Boolean>... predicates)
Returns a composed
Lang.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> Lang.Predicate<T> |
Lang.predicate(Lang.Function<? super T,Boolean> f)
Convert a
Function<T, Boolean> typed function to Predicate<T> function. |
static <T> Lang.Predicate<T> |
Lang.F.requireNotNull()
The type-safe version of
Lang.F.NOT_NULL |
static <T> Lang.Predicate<T> |
Lang.F.yes()
A type-safe version of
Lang.F.TRUE |
| Modifier and Type | Method and Description |
|---|---|
static void |
OsglConfig.registerBinaryDataProbe(Lang.Predicate<Readable> probe) |
static void |
OsglConfig.registerImmutableClassPredicate(Lang.Predicate<Class> predicate) |
static void |
OsglConfig.setSingletonChecker(Lang.Predicate singletonChecker) |
| Modifier and Type | Field and Description |
|---|---|
static Lang.Predicate<String> |
S.F.IS_BLANK |
static Lang.Predicate<String> |
S.F.IS_EMPTY |
static Lang.Predicate<Integer> |
N.F.IS_EVEN |
static Lang.Predicate<Integer> |
N.F.IS_ODD |
static Lang.Predicate<String> |
S.F.NOT_BLANK |
static Lang.Predicate<String> |
S.F.NOT_EMPTY |
| Modifier and Type | Method and Description |
|---|---|
static <T> Lang.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> Lang.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> Lang.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> Lang.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> Lang.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> Lang.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> Lang.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 Lang.Predicate<String> |
S.F.contains(String search) |
static <T> Lang.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> Lang.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> Lang.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 Lang.Predicate<String> |
S.F.endsWith(String suffix) |
static Lang.Predicate<Integer> |
N.F.greaterThan(int n) |
static Lang.Predicate<Integer> |
N.F.greaterThanOrEqualsTo(int n) |
static Lang.Predicate<Integer> |
N.F.gt(int n) |
static Lang.Predicate<Integer> |
N.F.gte(int n) |
static Lang.Predicate<Integer> |
N.F.lessThan(int n) |
static Lang.Predicate<Integer> |
N.F.lessThanOrEqualsTo(int n) |
static Lang.Predicate<Integer> |
N.F.lt(int n) |
static Lang.Predicate<Integer> |
N.F.lte(int n) |
static <T> Lang.Predicate<Collection<? super T>> |
C.F.remove(T toBeRemoved)
Returns a function that remove the element specified from the argument collection.
|
static <T> Lang.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> Lang.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> Lang.Predicate<T> |
C.F.removeFrom(Collection<? super T> collection)
Returns a function that remove the argument from a collection specified.
|
static <T> Lang.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> Lang.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 Lang.Predicate<String> |
S.F.startsWith(String prefix) |
| Modifier and Type | Method and Description |
|---|---|
C.Sequence<T> |
C._FilterStage.by(Lang.Predicate<? super T> predicate) |
static <T> C._FilterStage2<T> |
C.filter(Lang.Predicate<? super T> predicate) |
S._IterableJoiner |
S._IterableJoiner.filter(Lang.Predicate<String> filter) |
Copyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.