tcl.lang
Class ExprValue

java.lang.Object
  extended by tcl.lang.ExprValue

public final class ExprValue
extends java.lang.Object

Describes an expression value, which can be either an integer (the usual case), a double-precision floating-point value, or a string. A number type will typically have a string value that is the number string before it was parsed into a number. If the number has no string value then one will be generated by getStringValue().


Constructor Summary
ExprValue(boolean b)
           
ExprValue(double d, java.lang.String s)
           
ExprValue(int i, java.lang.String s)
           
ExprValue(java.lang.String s)
           
 
Method Summary
 boolean getBooleanValue(Interp interp)
           
 double getDoubleValue()
           
 int getIntValue()
           
 java.lang.String getStringValue()
           
 int getType()
           
 boolean isDoubleType()
           
 boolean isIntOrDoubleType()
           
 boolean isIntType()
           
 boolean isStringType()
           
 void nullStringValue()
           
 void optIntUnaryNot()
           
 void optIntUnaryNotNstr()
           
 void setDoubleValue(double value)
           
 void setDoubleValue(double value, java.lang.String s)
           
 void setIntValue(boolean b)
           
 void setIntValue(int value)
           
 void setIntValue(int value, java.lang.String s)
           
 void setStringValue(java.lang.String s)
           
 void setValue(ExprValue value2)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExprValue

public ExprValue(int i,
                 java.lang.String s)

ExprValue

public ExprValue(double d,
                 java.lang.String s)

ExprValue

public ExprValue(java.lang.String s)

ExprValue

public ExprValue(boolean b)
Method Detail

getType

public final int getType()

isIntType

public final boolean isIntType()

isDoubleType

public final boolean isDoubleType()

isStringType

public final boolean isStringType()

isIntOrDoubleType

public final boolean isIntOrDoubleType()

getIntValue

public final int getIntValue()

getDoubleValue

public final double getDoubleValue()

getStringValue

public final java.lang.String getStringValue()

getBooleanValue

public final boolean getBooleanValue(Interp interp)
                              throws TclException
Throws:
TclException

setIntValue

public final void setIntValue(int value)

setIntValue

public final void setIntValue(int value,
                              java.lang.String s)

setIntValue

public final void setIntValue(boolean b)

setDoubleValue

public final void setDoubleValue(double value)

setDoubleValue

public final void setDoubleValue(double value,
                                 java.lang.String s)

setStringValue

public final void setStringValue(java.lang.String s)

setValue

public final void setValue(ExprValue value2)

nullStringValue

public final void nullStringValue()

toString

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

optIntUnaryNot

public final void optIntUnaryNot()

optIntUnaryNotNstr

public final void optIntUnaryNotNstr()