Interface CardinalityRestriction

    • Method Detail

      • setCardinality

        void setCardinality​(int cardinality)

        Assert that this restriction restricts the property to have the given cardinality. Any existing statements for cardinality will be removed.

        Parameters:
        cardinality - The cardinality of the restricted property
        Throws:
        ProfileException - If the Profile.CARDINALITY() property is not supported in the current language profile.
      • getCardinality

        int getCardinality()

        Answer the cardinality of the restricted property.

        Returns:
        The cardinality of the restricted property
        Throws:
        ProfileException - If the Profile.CARDINALITY() property is not supported in the current language profile.
      • hasCardinality

        boolean hasCardinality​(int cardinality)

        Answer true if this property restriction has the given cardinality.

        Parameters:
        cardinality - The cardinality to test against
        Returns:
        True if the given cardinality is the cardinality of the restricted property in this restriction
        Throws:
        ProfileException - If the Profile.CARDINALITY() property is not supported in the current language profile.
      • removeCardinality

        void removeCardinality​(int cardinality)

        Remove the statement that this restriction has the given cardinality for the restricted property. If this statement is not true of the current model, nothing happens.

        Parameters:
        cardinality - A cardinality value to be removed from this restriction