Interface CombinedPredicate<ENTITY>

Type Parameters:
ENTITY - the entity type
All Superinterfaces:
Comparator<ENTITY>, com.speedment.runtime.compute.expression.Expression<ENTITY>, com.speedment.runtime.compute.trait.HasAsDouble<ENTITY>, com.speedment.runtime.compute.trait.HasAsInt<ENTITY>, com.speedment.runtime.compute.trait.HasAsLong<ENTITY>, com.speedment.runtime.compute.trait.HasCompare<ENTITY>, com.speedment.runtime.compute.trait.HasCompose<ENTITY>, com.speedment.runtime.compute.trait.HasHash<ENTITY>, com.speedment.runtime.compute.trait.HasMap<ENTITY,com.speedment.common.function.BooleanUnaryOperator,com.speedment.runtime.compute.ToBoolean<ENTITY>>, com.speedment.runtime.compute.trait.HasMapToDouble<ENTITY,com.speedment.common.function.BooleanToDoubleFunction>, Predicate<ENTITY>, SpeedmentPredicate<ENTITY>, com.speedment.runtime.compute.ToBoolean<ENTITY>, com.speedment.common.function.ToBooleanFunction<ENTITY>

public interface CombinedPredicate<ENTITY> extends SpeedmentPredicate<ENTITY>
Aggregation of a number of Predicates of the same type (e.g. AND or OR) that can be applied in combination.
Author:
Per Minborg, Emil Forslund
  • Method Details

    • stream

      Stream<Predicate<? super ENTITY>> stream()
      Creates and returns a {link Stream} of all predicates that this CombinedPredicate holds.
      Returns:
      a {link Stream} of all predicates that this CombinedPredicate holds
    • size

      int size()
      Returns the number of predicates that this CombinedBasePredicate holds
      Returns:
      the number of predicates that this CombinedBasePredicate holds
    • getType

      Returns the CombinedPredicate.Type of this CombinedBasePredicate
      Returns:
      the CombinedPredicate.Type of this CombinedBasePredicate
    • and

      CombinedPredicate<ENTITY> and(Predicate<? super ENTITY> other)
      Specified by:
      and in interface Predicate<ENTITY>
      Specified by:
      and in interface SpeedmentPredicate<ENTITY>
    • or

      Specified by:
      or in interface Predicate<ENTITY>
      Specified by:
      or in interface SpeedmentPredicate<ENTITY>
    • negate

      Specified by:
      negate in interface Predicate<ENTITY>
      Specified by:
      negate in interface SpeedmentPredicate<ENTITY>
    • and

      static <ENTITY> CombinedPredicate<ENTITY> and(Predicate<ENTITY> first, Predicate<? super ENTITY> second)
      Creates and returns a new CombinedPredicate that is the logical AND combination of the given predicates.
      Type Parameters:
      ENTITY - entity type
      Parameters:
      first - the first predicate used in the AND operation
      second - the first predicate used in the AND operation
      Returns:
      a new CombinedPredicate that is the logical AND combination of the given predicates
    • and

      static <ENTITY> CombinedPredicate<ENTITY> and(List<Predicate<? super ENTITY>> predicates)
      Creates and returns a new CombinedPredicate that is the logical AND combination of the given predicates.
      Type Parameters:
      ENTITY - entity type
      Parameters:
      predicates - the predicates that make up the AND operation
      Returns:
      a new CombinedPredicate that is the logical AND combination of the given predicates
    • or

      static <ENTITY> CombinedPredicate<ENTITY> or(Predicate<ENTITY> first, Predicate<? super ENTITY> second)
      Creates and returns a new CombinedPredicate that is the logical OR combination of the given predicates.
      Type Parameters:
      ENTITY - entity type
      Parameters:
      first - the first predicate used in the OR operation
      second - the first predicate used in the OR operation
      Returns:
      a new CombinedPredicate that is the logical OR combination of the given predicates
    • or

      static <ENTITY> CombinedPredicate<ENTITY> or(List<Predicate<? super ENTITY>> predicates)
      Creates or returns a new CombinedPredicate that is the logical OR combination of the given predicates.
      Type Parameters:
      ENTITY - entity type
      Parameters:
      predicates - the predicates that make up the OR operation
      Returns:
      a new CombinedPredicate that is the logical OR combination of the given predicates