org.hackystat.telemetry.analyzer.language.ast
Class NumberConstant

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.language.ast.Constant
      extended by org.hackystat.telemetry.analyzer.language.ast.NumberConstant
All Implemented Interfaces:
Expression

public class NumberConstant
extends Constant

Number constant in telemetry language.

Version:
$Id$
Author:
(Cedric) Qin ZHANG

Constructor Summary
NumberConstant(java.lang.Number value)
          Constructs this instance with supplied number value.
 
Method Summary
 boolean equals(java.lang.Object another)
          Tests for equality of two instances.
 java.lang.Number getValue()
          Gets the value of this number.
 java.lang.String getValueString()
          Gets the string representation of this number.
 int hashCode()
          Gets the hash code for this instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberConstant

public NumberConstant(java.lang.Number value)
Constructs this instance with supplied number value.

Parameters:
value - The number value.
Method Detail

getValue

public java.lang.Number getValue()
Gets the value of this number.

Returns:
The value.

getValueString

public java.lang.String getValueString()
Gets the string representation of this number.

Specified by:
getValueString in class Constant
Returns:
The string representation of this number.

equals

public boolean equals(java.lang.Object another)
Tests for equality of two instances.

Overrides:
equals in class java.lang.Object
Parameters:
another - The other object to be tested with this object.
Returns:
True if two instances are equal.

hashCode

public int hashCode()
Gets the hash code for this instance.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.