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
  • Field Details

  • Constructor Details

    • Criteria

      public Criteria()
  • Method Details

    • of

      public static final <E,​ C extends Criteria<E,​ C,​ T>,​ T extends Criteria.TestContext<E,​ C>> Criteria<E,​C,​T> of​(BiPredicate<T,​E> predicate)
    • of

      public static final <E,​ C extends Criteria<E,​ C,​ T>,​ T extends Criteria.TestContext<E,​ C>> Criteria<E,​C,​T> of​(Predicate<E> predicate)
    • and

      public C and()
    • or

      public C or()
    • and

      public C and​(C criteria)
    • or

      public C or​(C criteria)
    • 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

      public C allThoseThatMatch​(Predicate<E> predicate)
    • allThoseThatMatch

      public C allThoseThatMatch​(BiPredicate<T,​E> predicate)
    • newInstance

      protected C newInstance()
    • getPredicateWrapper

      protected <V> BiPredicate<T,​E> getPredicateWrapper​(BiFunction<T,​E,​V[]> valueSupplier, TriPredicate<T,​V[],​Integer> predicate)
    • concat

      protected BiPredicate<T,​E> concat​(BiPredicate<T,​E> mainPredicate, BiPredicate<T,​E> otherPredicate)
    • concat

      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)
    • hasNoPredicate

      public boolean hasNoPredicate()
    • testWithFalseResultForNullEntityOrTrueResultForNullPredicate

      public T testWithFalseResultForNullEntityOrTrueResultForNullPredicate​(E entity)
    • testWithTrueResultForNullEntityOrTrueResultForNullPredicate

      public T testWithTrueResultForNullEntityOrTrueResultForNullPredicate​(E entity)
    • testWithFalseResultForNullEntityOrFalseResultForNullPredicate

      public T testWithFalseResultForNullEntityOrFalseResultForNullPredicate​(E entity)
    • testWithTrueResultForNullEntityOrFalseResultForNullPredicate

      public T testWithTrueResultForNullEntityOrFalseResultForNullPredicate​(E entity)
    • getPredicateOrFalsePredicateIfPredicateIsNull

      public Predicate<E> getPredicateOrFalsePredicateIfPredicateIsNull()
    • getPredicateOrTruePredicateIfPredicateIsNull

      public Predicate<E> getPredicateOrTruePredicateIfPredicateIsNull()
    • getContextWithFalsePredicateForNullPredicate

      protected T getContextWithFalsePredicateForNullPredicate()
    • getContextWithTruePredicateForNullPredicate

      protected T getContextWithTruePredicateForNullPredicate()
    • createCopy

      public C createCopy()
    • createTestContext

      protected T createTestContext()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable