|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttcl.lang.TclInteger
public class TclInteger
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)
Deprecated. |
static int |
getInt(Interp interp,
TclObject tobj)
Tcl_GetIntFromObj -> TclInteger.getValue Returns the integer value of the object as a Java int. |
static long |
getLong(Interp interp,
TclObject tobj)
Tcl_GetIntFromObj -> TclInteger.getValue Returns the integer value of the object as a Java long. |
static void |
incr(Interp interp,
TclObject tobj,
long incrAmount)
Increments the integer value of the object by the given amount. |
static boolean |
isWithinIntRange(Interp interp,
TclObject tobj)
Tests whether TclInteger.getInt() will return a valid Java int value |
static boolean |
isWithinLongRange(Interp interp,
TclObject tobj)
Tests whether TclInteger.getLong() will return a valid Java long value |
static TclObject |
newInstance(long i)
Tcl_NewIntObj -> TclInteger.newInstance Creates a new instance of a TclObject with a TclInteger internal representation. |
static void |
set(TclObject tobj,
long i)
Changes the integer value of the object. |
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 |
---|
public InternalRep duplicate()
duplicate
in interface InternalRep
public void dispose()
dispose
in interface InternalRep
public String toString()
toString
in class Object
public static TclObject newInstance(long i)
i
- initial value of the integer object.
@Deprecated public static int get(Interp interp, TclObject tobj) throws TclException
interp
- current interpreter.tobj
- the object to operate on.
TclException
public static long getLong(Interp interp, TclObject tobj) throws TclException
interp
- current interpreter.tobj
- the object to operate on.
TclException
public static int getInt(Interp interp, TclObject tobj) throws TclException
interp
- current interpreter.tobj
- the object to operate on.
TclException
- if value will exceed limits of a Java intpublic static boolean isWithinLongRange(Interp interp, TclObject tobj)
interp
- current interpreter, may be nulltobj
- The TclObject to be tested
public static boolean isWithinIntRange(Interp interp, TclObject tobj)
interp
- current interpreturn, may be nulltobj
- The TclObject to be tested
public static void set(TclObject tobj, long i)
tobj
- the object to operate on.i
- the new integer value.public static void incr(Interp interp, TclObject tobj, long incrAmount) throws TclException
interp
- current interpreter.tobj
- the object to operate on.incrAmount
- amount to increment
TclException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |