tcl.lang
Class ExprValue

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

public final class ExprValue
extends 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().


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

Field Detail

INT

public static final int INT
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

STRING

public static final int STRING
See Also:
Constant Field Values
Constructor Detail

ExprValue

public ExprValue(long i,
                 String s)

ExprValue

public ExprValue(double d,
                 String s)

ExprValue

public ExprValue(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 long getIntValue()

getDoubleValue

public final double getDoubleValue()

getStringValue

public final String getStringValue()

getBooleanValue

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

setIntValue

public final void setIntValue(long value)

setIntValue

public final void setIntValue(long value,
                              String s)

setIntValue

public final void setIntValue(boolean b)

setDoubleValue

public final void setDoubleValue(double value)

setDoubleValue

public final void setDoubleValue(double value,
                                 String s)

setStringValue

public final void setStringValue(String s)

setValue

public final void setValue(ExprValue value2)

nullStringValue

public final void nullStringValue()

toString

public String toString()
Overrides:
toString in class Object

optIntPlus

public final void optIntPlus(ExprValue value2)

optIntUnaryNot

public final void optIntUnaryNot()

optIntUnaryNotNstr

public final void optIntUnaryNotNstr()


Copyright © 2015. All rights reserved.