Enhance binary compare operators, especially equals, to more closely match what standard lua does.

This commit is contained in:
James Roseborough
2007-06-14 04:58:09 +00:00
parent 14108aee87
commit 19bd995ba6
6 changed files with 93 additions and 10 deletions

View File

@@ -1,6 +1,16 @@
package lua.value;
import lua.Lua;
abstract
public class LNumber extends LValue {
/** 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 );
}
}