Files
luaj/src/main/java/lua/value/LNumber.java
Ian Farmer 635f127cd0 Add new built-in function type() that returns the name of the type of
the given value as a string. Includes test case.
2007-07-16 02:37:08 +00:00

23 lines
429 B
Java

package lua.value;
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) )
return false;
LValue v = (LValue) o;
return this.luaBinCmpUnknown(Lua.OP_EQ, v );
}
public LString luaGetType() {
return TYPE_NAME;
}
}