Class ConstantValue

  • All Implemented Interfaces:
    IAttributeAccess

    public class ConstantValue
    extends Leaf
    Class for a constant value.
    Author:
    jaehne, Holger Eichelberger
    • Field Detail

      • constant

        private Value constant
    • Constructor Detail

      • ConstantValue

        ConstantValue()
        Constructor for serialization.
      • ConstantValue

        public ConstantValue​(Value constant)
        Sole constructor for the creation of a constant value.
        Parameters:
        constant - Constant value to be stored.
    • Method Detail

      • getConstantValue

        public Value getConstantValue()
        Getter-Method for the constant-value.
        Returns:
        the value of the constant-attribute.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getContainedType

        public IDatatype getContainedType()
        Description copied from class: ConstraintSyntaxTree
        Returns the data type explicitly contained in this syntax tree. This is typically a constant value which contains a meta value, i.e. a type expression.
        Overrides:
        getContainedType in class ConstraintSyntaxTree
        Returns:
        the contained type or null if there is none
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isNull

        public static final boolean isNull​(ConstraintSyntaxTree cst)
        Returns whether the given constraint is exactly the IVML null value.
        Parameters:
        cst - the constraint syntax tree
        Returns:
        true if cst is null, false else