Class LiteralExpression


  • public class LiteralExpression
    extends Expression
    A literal is a constant value.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object value
      The literal value.
    • Constructor Summary

      Constructors 
      Constructor Description
      LiteralExpression​(java.lang.Object value)
      Create a new literal.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsVariable​(Variable var)
      Test if a variable is contained in the expression.
      boolean equals​(java.lang.Object o)
      Test if this value is equal to some object.
      java.lang.Object getValue()
      Get the value.
      int hashCode()
      Get the hash code of this variable.
      java.lang.String toString()
      Get a string representation of this value.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • value

        protected java.lang.Object value
        The literal value.
    • Constructor Detail

      • LiteralExpression

        public LiteralExpression​(java.lang.Object value)
        Create a new literal.
    • Method Detail

      • containsVariable

        public boolean containsVariable​(Variable var)
        Test if a variable is contained in the expression.
        Specified by:
        containsVariable in class Expression
        Parameters:
        var - The variable.
        Returns:
        True, when the variable is contained.
      • getValue

        public java.lang.Object getValue()
        Get the value.
      • toString

        public java.lang.String toString()
        Get a string representation of this value.
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Test if this value is equal to some object.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Get the hash code of this variable.
        Overrides:
        hashCode in class java.lang.Object