Class ComposedConstraint

java.lang.Object
de.espirit.or.query.ComposedConstraint
All Implemented Interfaces:
Constraint, Serializable, Cloneable
Direct Known Subclasses:
And, Or

public abstract class ComposedConstraint extends Object implements Constraint
The base class of all composed constraints.
Since:
4.0.17
See Also:
  • Constructor Details

    • ComposedConstraint

      public ComposedConstraint()
  • Method Details

    • getConstraints

      public List<Constraint> getConstraints()
      Return an unmodifiable list of all sub contraints contained in this composed constraint.
      Since:
      4.0.17
    • add

      public void add(@NotNull @NotNull Constraint constraint)
      Add a new sub constraint to this composed constraint.
      Since:
      4.0.17
    • size

      public int size()
      Returns the number of sub constraints.
      Since:
      4.0.17
    • isEmpty

      public boolean isEmpty()
      Check if this is an empty constraint. Empty constraints could be omitted without changing the query result.
      Specified by:
      isEmpty in interface Constraint
      Returns:
      true if the constraint is empty, i.e. removing the constraint would not change the query result.
      Since:
      5.0.102