com.sun.wbem.query
Class NumericValue

java.lang.Object
  |
  +--com.sun.wbem.query.ValueExp
        |
        +--com.sun.wbem.query.NumericValue

public class NumericValue
extends ValueExp

This class represents numbers that are arguments to SQL relational constraints. A NumericValue may be used anywhere a ValueExp is required.

Since:
WBEM 1.0
See Also:
Serialized Form

Constructor Summary
NumericValue()
          Constructs a NumericValue corresponding to 0.
NumericValue(java.lang.Number val)
          Creates a new NumericValue representing the numeric literal val.
 
Method Summary
 double doubleValue()
          Returns the double value associated with this value.
 boolean isReal()
          Check if the value is a real.
 boolean isSint()
          Check if the value is a signed int.
 boolean isUint()
          Check if the value is an unsigned int.
 long longValue()
          Returns the long value associated with this value.
 java.lang.String toString()
          Returns a string representing the numeric value.
 UnsignedInt64 uint64Value()
          Returns the UnsignedInt64 value associated with this value.
 
Methods inherited from class com.sun.wbem.query.ValueExp
apply
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumericValue

public NumericValue(java.lang.Number val)
Creates a new NumericValue representing the numeric literal val.

NumericValue

public NumericValue()
Constructs a NumericValue corresponding to 0.
Method Detail

doubleValue

public double doubleValue()
Returns the double value associated with this value.
Returns:
double value of this numeric value.

longValue

public long longValue()
Returns the long value associated with this value.
Returns:
long value of this numeric value.

uint64Value

public UnsignedInt64 uint64Value()
Returns the UnsignedInt64 value associated with this value.
Returns:
UnsignedInt64 value of this numeric value.

isUint

public boolean isUint()
Check if the value is an unsigned int.
Returns:
boolean true if the the value is an unsigned int, false otherwise

isSint

public boolean isSint()
Check if the value is a signed int.
Returns:
boolean true if the the value is a signed int, false otherwise

isReal

public boolean isReal()
Check if the value is a real.
Returns:
boolean true if the the value is a real, false otherwise

toString

public java.lang.String toString()
Returns a string representing the numeric value.
Overrides:
toString in class java.lang.Object
Returns:
The numeric value as a string.