Class ConstraintValue


public class ConstraintValue extends BasisDatatypeValue
This class holds the value for a constraint type.
Author:
Holger Eichelberger
  • Field Details

  • Constructor Details

    • ConstraintValue

      protected ConstraintValue()
      Argumentless constructor.
    • ConstraintValue

      protected ConstraintValue(Object value) throws ValueDoesNotMatchTypeException
      Constructor.
      Parameters:
      value - Value of the Datatype
      Throws:
      ValueDoesNotMatchTypeException - in case that the given value does not match the requirements of this class, i.e. cannot be converted
    • ConstraintValue

      protected ConstraintValue(ConstraintSyntaxTree value)
      Constructor.
      Parameters:
      value - Value of the Datatype
  • Method Details

    • setValue

      public void setValue(Object value) throws ValueDoesNotMatchTypeException
      Setter for the value.
      Specified by:
      setValue in class Value
      Parameters:
      value - Value of the Datatype
      Throws:
      ValueDoesNotMatchTypeException - if the given value does not match this type
    • getValue

      public ConstraintSyntaxTree getValue()
      Returns the stored value.
      Overrides:
      getValue in class BasisDatatypeValue
      Returns:
      the stored constraint (may be null)
    • accept

      public void accept(IValueVisitor visitor)
      Accept method for the visitor.
      This method is used for saving this model element.
      Specified by:
      accept in class Value
      Parameters:
      visitor - The visitor, which should save this model element.
    • isConfigured

      public boolean isConfigured()
      Description copied from class: Value
      Abstract Method to check whether a value is configured.
      Specified by:
      isConfigured in class Value
      Returns:
      true = it is configured / false = it is not
    • clone

      public Value clone()
      Description copied from class: Value
      Clones the this value.
      Overrides:
      clone in class Value
      Returns:
      the clone of the value
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Value
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Value
    • toString

      public String toString()
      Overrides:
      toString in class Value