org.luaj.vm
Class LInteger

java.lang.Object
  extended by org.luaj.vm.LValue
      extended by org.luaj.vm.LNumber
          extended by org.luaj.vm.LInteger

public class LInteger
extends LNumber


Field Summary
 
Fields inherited from class org.luaj.vm.LValue
TM_INDEX, TM_METATABLE, TM_MODE, TM_NEWINDEX
 
Method Summary
 int hashCode()
           
static int hashCodeOf(int v)
           
 boolean isInteger()
          Returns false by default for non-LNumbers, but subclasses of LNumber must override.
 LString luaAsString()
          Get the value as a LString
 boolean luaBinCmpDouble(int opcode, double rhs)
           
 boolean luaBinCmpInteger(int opcode, int rhs)
           
 boolean luaBinCmpUnknown(int opcode, LValue lhs)
           
 LValue luaBinOpDouble(int opcode, double rhs)
           
 LValue luaBinOpInteger(int opcode, int rhs)
           
 LValue luaBinOpUnknown(int opcode, LValue lhs)
           
 LValue luaUnaryMinus()
          Arithmetic negative
 double toJavaDouble()
          Return value as a double
 float toJavaFloat()
          Return value as a float
 int toJavaInt()
          Return value as an integer
 long toJavaLong()
          Return value as a long
 java.lang.String toJavaString()
          Convert to a Java String
static LInteger valueOf(int n)
          Get an LInteger corresponding to a particular int value
 
Methods inherited from class org.luaj.vm.LNumber
equals, isNumber, isString, luaConcatTo, luaGetType, luaToNumber, toJavaBoxedByte, toJavaBoxedCharacter, toJavaBoxedDouble, toJavaBoxedFloat, toJavaBoxedInteger, toJavaBoxedLong, toJavaBoxedShort
 
Methods inherited from class org.luaj.vm.LValue
compareError, conversionError, id, isClosure, isFunction, isNil, isTable, isUserData, luaBinCmpString, luaGetEnv, luaGetMetatable, luaGetTable, luaGetTypeName, luaLength, luaSetEnv, luaSetMetatable, luaSetTable, luaStackCall, toJavaBoolean, toJavaBoxedBoolean, toJavaByte, toJavaChar, toJavaInstance, toJavaShort, toString, toStrongReference
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

valueOf

public static LInteger valueOf(int n)
Get an LInteger corresponding to a particular int value


hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

hashCodeOf

public static int hashCodeOf(int v)

toJavaInt

public int toJavaInt()
Description copied from class: LValue
Return value as an integer

Overrides:
toJavaInt in class LValue

toJavaLong

public long toJavaLong()
Description copied from class: LValue
Return value as a long

Overrides:
toJavaLong in class LValue

toJavaFloat

public float toJavaFloat()
Description copied from class: LValue
Return value as a float

Overrides:
toJavaFloat in class LValue

toJavaDouble

public double toJavaDouble()
Description copied from class: LValue
Return value as a double

Overrides:
toJavaDouble in class LValue

luaAsString

public LString luaAsString()
Description copied from class: LValue
Get the value as a LString

Overrides:
luaAsString in class LValue

toJavaString

public java.lang.String toJavaString()
Description copied from class: LValue
Convert to a Java String

Overrides:
toJavaString in class LValue

isInteger

public boolean isInteger()
Description copied from class: LNumber
Returns false by default for non-LNumbers, but subclasses of LNumber must override.

Specified by:
isInteger in class LNumber

luaBinOpUnknown

public LValue luaBinOpUnknown(int opcode,
                              LValue lhs)
Overrides:
luaBinOpUnknown in class LValue

luaBinOpInteger

public LValue luaBinOpInteger(int opcode,
                              int rhs)
Overrides:
luaBinOpInteger in class LValue

luaBinOpDouble

public LValue luaBinOpDouble(int opcode,
                             double rhs)
Overrides:
luaBinOpDouble in class LValue

luaBinCmpUnknown

public boolean luaBinCmpUnknown(int opcode,
                                LValue lhs)
Overrides:
luaBinCmpUnknown in class LValue

luaBinCmpInteger

public boolean luaBinCmpInteger(int opcode,
                                int rhs)
Overrides:
luaBinCmpInteger in class LValue

luaBinCmpDouble

public boolean luaBinCmpDouble(int opcode,
                               double rhs)
Overrides:
luaBinCmpDouble in class LValue

luaUnaryMinus

public LValue luaUnaryMinus()
Arithmetic negative

Overrides:
luaUnaryMinus in class LValue


Copyright © 2007-2013 Luaj.org. All Rights Reserved.