tcl.lang
Class TclInteger

java.lang.Object
  extended by tcl.lang.TclInteger
All Implemented Interfaces:
InternalRep

public class TclInteger
extends java.lang.Object
implements InternalRep

This class implements the integer object type in Tcl.


Method Summary
 void dispose()
          Implement this no-op for the InternalRep interface.
 InternalRep duplicate()
          Should never be invoked.
static int get(Interp interp, TclObject tobj)
          Tcl_GetIntFromObj -> TclInteger.get Returns the integer value of the object.
static TclObject newInstance(int i)
          Tcl_NewIntObj -> TclInteger.newInstance Creates a new instance of a TclObject with a TclInteger internal representation.
static void set(TclObject tobj, int i)
          Changes the integer value of the object.
 java.lang.String toString()
          Should never be invoked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

duplicate

public InternalRep duplicate()
Should never be invoked.

Specified by:
duplicate in interface InternalRep

dispose

public void dispose()
Implement this no-op for the InternalRep interface.

Specified by:
dispose in interface InternalRep

toString

public java.lang.String toString()
Should never be invoked.

Overrides:
toString in class java.lang.Object

newInstance

public static TclObject newInstance(int i)
Tcl_NewIntObj -> TclInteger.newInstance Creates a new instance of a TclObject with a TclInteger internal representation.

Parameters:
b - initial value of the integer object.
Returns:
the TclObject with the given integer value.

get

public static int get(Interp interp,
                      TclObject tobj)
               throws TclException
Tcl_GetIntFromObj -> TclInteger.get Returns the integer value of the object.

Parameters:
interp - current interpreter.
tobj - the object to operate on.
Returns:
the integer value of the object.
Throws:
TclException

set

public static void set(TclObject tobj,
                       int i)
Changes the integer value of the object.

Parameters:
interp - current interpreter.
tobj - the object to operate on.
i - the new integer value.