Class Criterion

    • Constructor Detail

      • Criterion

        public Criterion​(GTIngredientList owner,
                         int elementCount)
        Construct a criterion within the given list as its owner containing a given number of elements. All elements are enabled at the beginning.
        Parameters:
        owner - The list as the owner of the constructed GTIngredientList.
        elementCount - The number of elements that the GTIngredient has.
    • Method Detail

      • canCheck

        public boolean canCheck​(NamedObj object)
        Return whether this criterion can check the given object.
        Parameters:
        object - The object.
        Returns:
        true if the object can be checked.
      • match

        public abstract boolean match​(NamedObj object)
        Test whether the given object in the host model matches the object in the pattern that has this criterion.
        Parameters:
        object - The object.
        Returns:
        true if the object matches.