All Superinterfaces:
PrimitiveValue, Value
All Known Implementing Classes:
DoubleValue, IntValue

public interface NumberValue extends PrimitiveValue
  • Field Details

  • Method Details

    • type

      default StringValue type()
      Specified by:
      type in interface Value
    • getDouble

      double getDouble()
    • getInt

      int getInt()
    • getLong

      long getLong()
    • isLong

      boolean isLong()
    • isInt

      boolean isInt()
    • equals

      boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      String toString()
      Overrides:
      toString in class Object
    • toBoolean

      default boolean toBoolean()
      Specified by:
      toBoolean in interface Value
    • toNumber

      default NumberValue toNumber(me.topchetoeu.j2s.common.Environment ext)
      Specified by:
      toNumber in interface Value
    • toString

      default String toString(me.topchetoeu.j2s.common.Environment ext)
      Specified by:
      toString in interface Value
    • getPrototype

      default ObjectValue getPrototype(me.topchetoeu.j2s.common.Environment env)
      Specified by:
      getPrototype in interface Value
    • of

      static NumberValue of(double value)
    • of

      static NumberValue of(long value)
    • of

      static NumberValue of(int value)