本文整理匯總了Java中org.luaj.vm2.LuaValue.TRUE屬性的典型用法代碼示例。如果您正苦於以下問題:Java LuaValue.TRUE屬性的具體用法?Java LuaValue.TRUE怎麽用?Java LuaValue.TRUE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.luaj.vm2.LuaValue
的用法示例。
在下文中一共展示了LuaValue.TRUE屬性的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: invoke
public Varargs invoke(Varargs args) {
String s = args.checkjstring(1);
if ("collect".equals(s)) {
System.gc();
return ZERO;
} else if ("count".equals(s)) {
Runtime rt = Runtime.getRuntime();
long used = rt.totalMemory() - rt.freeMemory();
return varargsOf(valueOf(used / 1024.), valueOf(used % 1024));
} else if ("step".equals(s)) {
System.gc();
return LuaValue.TRUE;
} else {
this.argerror("gc op");
}
return NIL;
}
示例2: invoke
public Varargs invoke(Varargs args) {
String s = args.optjstring(1, "collect");
if ( "collect".equals(s) ) {
System.gc();
return ZERO;
} else if ( "count".equals(s) ) {
Runtime rt = Runtime.getRuntime();
long used = rt.totalMemory() - rt.freeMemory();
return varargsOf(valueOf(used/1024.), valueOf(used%1024));
} else if ( "step".equals(s) ) {
System.gc();
return LuaValue.TRUE;
} else {
this.argerror("gc op");
}
return NIL;
}
示例3: call
@Override
public final LuaValue call(LuaValue arg1) {
if (!arg1.isnumber()) {
return LuaValue.FALSE;
}
// Only sleep if the specified milliseconds to sleep is greater than 0
int ms;
if ((ms = arg1.toint()) > 0 && ClientAPIUtils.sleep(ms)) {
return LuaValue.TRUE;
}
return LuaValue.FALSE;
}
示例4: _io_flush
public Varargs _io_flush() throws IOException {
checkopen(output());
outfile.flush();
return LuaValue.TRUE;
}
示例5: _file_flush
public Varargs _file_flush(LuaValue file) throws IOException {
checkfile(file).flush();
return LuaValue.TRUE;
}
示例6: _file_setvbuf
public Varargs _file_setvbuf(LuaValue file, String mode, int size) {
checkfile(file).setvbuf(mode,size);
return LuaValue.TRUE;
}
示例7: successresult
private static Varargs successresult() {
return LuaValue.TRUE;
}
示例8: coerce
public LuaValue coerce( Object javaValue ) {
Boolean b = (Boolean) javaValue;
return b.booleanValue()? LuaValue.TRUE: LuaValue.FALSE;
}
示例9: call
@Override
public LuaValue call() {
return iter.hasNext() ? LuaValue.TRUE : LuaValue.FALSE;
}