centralize type id defs
This commit is contained in:
@@ -5,8 +5,6 @@ import lua.Lua;
|
||||
abstract
|
||||
public class LNumber extends LValue {
|
||||
|
||||
public static final LString TYPE_NAME = new LString("number");
|
||||
|
||||
/** Compare for equivalence by using lua op comparator */
|
||||
public boolean equals(Object o) {
|
||||
if ( ! ( o instanceof LValue) )
|
||||
@@ -15,10 +13,10 @@ public class LNumber extends LValue {
|
||||
return this.luaBinCmpUnknown(Lua.OP_EQ, v );
|
||||
}
|
||||
|
||||
public LString luaGetType() {
|
||||
return TYPE_NAME;
|
||||
public int luaGetType() {
|
||||
return Lua.LUA_TNUMBER;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns false by default for non-LNumbers, but subclasses of LNumber must
|
||||
* override.
|
||||
|
||||
Reference in New Issue
Block a user