Class NumberToken

  • All Implemented Interfaces:
    java.io.Serializable

    public final class NumberToken
    extends Token
    Represents a number in the expression
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      NumberToken​(double value)
      Create a new instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getValue()
      Get the value of the number
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from class net.objecthunter.exp4j.tokenizer.Token

        getType
    • Constructor Detail

      • NumberToken

        public NumberToken​(double value)
        Create a new instance
        Parameters:
        value - the value of the number
    • Method Detail

      • getValue

        public double getValue()
        Get the value of the number
        Returns:
        the value
      • toString

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