Type coercion for luajava package, make luajava an "addon"
This commit is contained in:
@@ -7,7 +7,7 @@ abstract
|
||||
public class LValue {
|
||||
|
||||
protected static LValue luaUnsupportedOperation() {
|
||||
throw new java.lang.UnsupportedOperationException();
|
||||
throw new java.lang.RuntimeException( "not supported" );
|
||||
}
|
||||
|
||||
public String id() {
|
||||
@@ -106,6 +106,11 @@ public class LValue {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Return value as a double */
|
||||
public double luaAsDouble() {
|
||||
return luaAsInt();
|
||||
}
|
||||
|
||||
/** Arithmetic negative */
|
||||
public LValue luaUnaryMinus() {
|
||||
return luaUnsupportedOperation();
|
||||
|
||||
Reference in New Issue
Block a user