Class ConstraintBase

  • All Implemented Interfaces:
    java.lang.Iterable<Constraint>

    public class ConstraintBase
    extends ConstraintList
    Implements the constraint base, a combination of linked list and map in order to quickly store, retrieve and delete constraints to be evaluated.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • ConstraintBase

        public ConstraintBase()
        Constructs an empty constraint base.
    • Method Detail

      • contains

        public boolean contains​(Constraint constraint)
        Description copied from class: ConstraintList
        Returns true if this list contains the specified constraint. More formally, returns true if and only if this list contains at least one constraint constraint such that o == constraint.
        Overrides:
        contains in class ConstraintList
        Parameters:
        constraint - the constraint whose presence in this list is to be tested
        Returns:
        true if this list contains the specified element
      • removeAll

        public boolean removeAll​(java.util.Collection<? extends Constraint> constraints)
        Description copied from class: ConstraintList
        Removes all elements from this list, which are also in constraints.
        Overrides:
        removeAll in class ConstraintList
        Parameters:
        constraints - the elements to remove
        Returns:
        the removed elements