org.luaj.vm
Class LDouble

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

public class LDouble
extends LNumber


Field Summary
 
Fields inherited from class org.luaj.vm.LValue
TM_INDEX, TM_METATABLE, TM_MODE, TM_NEWINDEX
 
Constructor Summary
LDouble(double value)
           
 
Method Summary
 int hashCode()
           
 boolean isInteger()
          Returns false by default for non-LNumbers, but subclasses of LNumber must override.
 boolean isValidKey()
          Return true if this value is is a valid lua key, false otherwise
 boolean luaBinCmpDouble(int opcode, double rhs)
           
static boolean luaBinCmpDoubleDouble(int opcode, double lhs, double rhs)
           
 boolean luaBinCmpInteger(int opcode, int rhs)
           
 boolean luaBinCmpUnknown(int opcode, LValue lhs)
           
 LValue luaBinOpDouble(int opcode, double rhs)
           
static LValue luaBinOpDoubleDouble(int opcode, double lhs, double rhs)
           
 LValue luaBinOpInteger(int opcode, int rhs)
           
 LValue luaBinOpUnknown(int opcode, LValue lhs)
           
 LValue luaUnaryMinus()
          Arithmetic negative
static LNumber numberOf(double z)
          Convert to LNumber, using LInteger if possible
 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 LDouble valueOf(double 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, luaAsString, 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
 

Constructor Detail

LDouble

public LDouble(double value)
Method Detail

valueOf

public static LDouble valueOf(double value)

numberOf

public static LNumber numberOf(double z)
Convert to LNumber, using LInteger if possible


hashCode

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

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

isValidKey

public boolean isValidKey()
Description copied from class: LValue
Return true if this value is is a valid lua key, false otherwise

Overrides:
isValidKey in class LValue

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

luaBinOpDoubleDouble

public static LValue luaBinOpDoubleDouble(int opcode,
                                          double lhs,
                                          double rhs)

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

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

luaBinCmpDoubleDouble

public static boolean luaBinCmpDoubleDouble(int opcode,
                                            double lhs,
                                            double rhs)

luaUnaryMinus

public LValue luaUnaryMinus()
Arithmetic negative

Overrides:
luaUnaryMinus in class LValue


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