Package org.burningwave.core
Class Criteria<E,C extends Criteria<E,C,T>,T extends Criteria.TestContext<E,C>>
java.lang.Object
org.burningwave.core.Criteria<E,C,T>
- All Implemented Interfaces:
AutoCloseable,Closeable,Identifiable
- Direct Known Subclasses:
CriteriaWithClassElementsSupplyingSupport,JavaClass.Criteria,ZipContainerEntryCriteria
public class Criteria<E,C extends Criteria<E,C,T>,T extends Criteria.TestContext<E,C>>
extends Object
implements Closeable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCriteria.Simple<E,C extends Criteria.Simple<E, C>> static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Function<BiPredicate<T, E>, BiPredicate<T, E>> protected BiPredicate<T, E> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallThoseThatMatch(BiPredicate<T, E> predicate) allThoseThatMatch(Predicate<E> predicate) and()voidclose()protected BiPredicate<T, E> concat(BiPredicate<T, E> mainPredicate, BiPredicate<T, E> otherPredicate) protected <E,C extends Criteria<E, C, T>, T extends Criteria.TestContext<E, C>>
BiPredicate<T, E> concat(BiPredicate<T, E> mainPredicate, Function<BiPredicate<T, E>, BiPredicate<T, E>> logicalOperator, BiPredicate<T, E> otherPredicate) protected Tprotected Tprotected Tprotected <V> BiPredicate<T, E> getPredicateWrapper(BiFunction<T, E, V[]> valueSupplier, TriPredicate<T, V[], Integer> predicate) booleanprotected ClogicOperation(C leftCriteria, C rightCriteria, Function<BiPredicate<T, E>, Function<BiPredicate<? super T, ? super E>, BiPredicate<T, E>>> binaryOperator, C targetCriteria) negate()protected Cstatic final <E,C extends Criteria<E, C, T>, T extends Criteria.TestContext<E, C>>
Criteria<E, C, T> of(BiPredicate<T, E> predicate) static final <E,C extends Criteria<E, C, T>, T extends Criteria.TestContext<E, C>>
Criteria<E, C, T> or()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.burningwave.core.Closeable
closeResources, closeResources, createCloseResoucesTask, createCloseResoucesTaskMethods inherited from interface org.burningwave.core.Identifiable
getId, getOperationId
-
Field Details
-
predicate
-
logicalOperator
protected Function<BiPredicate<T extends Criteria.TestContext<E,C>, logicalOperatorE>, BiPredicate<T extends Criteria.TestContext<E, C>, E>>
-
-
Constructor Details
-
Criteria
public Criteria()
-
-
Method Details
-
of
public static final <E,C extends Criteria<E, Criteria<E,C, T>, T extends Criteria.TestContext<E, C>> C, ofT> (BiPredicate<T, E> predicate) -
of
public static final <E,C extends Criteria<E, Criteria<E,C, T>, T extends Criteria.TestContext<E, C>> C, ofT> (Predicate<E> predicate) -
and
-
or
-
and
-
or
-
negate
-
logicOperation
protected C logicOperation(C leftCriteria, C rightCriteria, Function<BiPredicate<T, E>, Function<BiPredicate<? super T, ? super E>, BiPredicate<T, E>>> binaryOperator, C targetCriteria) -
allThoseThatMatch
-
allThoseThatMatch
-
newInstance
-
getPredicateWrapper
protected <V> BiPredicate<T,E> getPredicateWrapper(BiFunction<T, E, V[]> valueSupplier, TriPredicate<T, V[], Integer> predicate) -
concat
-
concat
protected <E,C extends Criteria<E, BiPredicate<T,C, T>, T extends Criteria.TestContext<E, C>> E> concat(BiPredicate<T, E> mainPredicate, Function<BiPredicate<T, E>, BiPredicate<T, E>> logicalOperator, BiPredicate<T, E> otherPredicate) -
hasNoPredicate
public boolean hasNoPredicate() -
testWithFalseResultForNullEntityOrTrueResultForNullPredicate
-
testWithTrueResultForNullEntityOrTrueResultForNullPredicate
-
testWithFalseResultForNullEntityOrFalseResultForNullPredicate
-
testWithTrueResultForNullEntityOrFalseResultForNullPredicate
-
getPredicateOrFalsePredicateIfPredicateIsNull
-
getPredicateOrTruePredicateIfPredicateIsNull
-
getContextWithFalsePredicateForNullPredicate
-
getContextWithTruePredicateForNullPredicate
-
createCopy
-
createTestContext
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-