Class Jasic.StringValue

    • Constructor Summary

      Constructors 
      Constructor Description
      StringValue​(java.lang.String value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Jasic.Value evaluate()
      Expression classes implement this to evaluate the expression and return the value.
      double toNumber()
      Value types override this to convert themselves to a numeric representation.
      java.lang.String toString()
      Value types override this to convert themselves to a string representation.
      • Methods inherited from class java.lang.Object

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

      • StringValue

        public StringValue​(java.lang.String value)
    • Method Detail

      • toString

        public java.lang.String toString()
        Description copied from interface: Jasic.Value
        Value types override this to convert themselves to a string representation.
        Specified by:
        toString in interface Jasic.Value
        Overrides:
        toString in class java.lang.Object
      • toNumber

        public double toNumber()
        Description copied from interface: Jasic.Value
        Value types override this to convert themselves to a numeric representation.
        Specified by:
        toNumber in interface Jasic.Value
      • evaluate

        public Jasic.Value evaluate()
        Description copied from interface: Jasic.Expression
        Expression classes implement this to evaluate the expression and return the value.
        Specified by:
        evaluate in interface Jasic.Expression
        Returns:
        The value of the calculated expression.