Class Constraint

  • All Implemented Interfaces:
    IConstraint, IModelElement

    public class Constraint
    extends java.lang.Object
    implements IConstraint
    Implements the constraint (delegate).
    Author:
    Holger Eichelberger
    • Constructor Summary

      Constructors 
      Constructor Description
      Constraint​(java.lang.String constraint, Project project)
      Creates a new constraint instances, i.e.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Constraint getInstance()
      Returns the related IVML instance.
      java.lang.String getName()
      Returns the name of the constraint.
      java.lang.String toString()
      Returns the textual representation of this constraint.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Constraint

        public Constraint​(java.lang.String constraint,
                          Project project)
                   throws ModelException
        Creates a new constraint instances, i.e. parses the input.
        Parameters:
        constraint - the constraint in textual IVML form
        project - the context for the semantic analysis
        Throws:
        ModelException - in case of any syntactial or semantical problems
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: IConstraint
        Returns the name of the constraint.
        Specified by:
        getName in interface IConstraint
        Returns:
        the name, empty in case of unnamed constraints
      • toString

        public java.lang.String toString()
        Description copied from interface: IConstraint
        Returns the textual representation of this constraint.
        Specified by:
        toString in interface IConstraint
        Overrides:
        toString in class java.lang.Object
        Returns:
        the textual representation in IVML syntax
      • getInstance

        public Constraint getInstance()
        Returns the related IVML instance.
        Returns:
        the related IVML instance