本文整理了Java中org.luaj.vm2.LuaTable.rawlen()
方法的一些代码示例,展示了LuaTable.rawlen()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LuaTable.rawlen()
方法的具体详情如下:
包路径:org.luaj.vm2.LuaTable
类名称:LuaTable
方法名:rawlen
暂无
代码示例来源:origin: hsllany/HtmlNative
/** Unpack all the elements of this table from element i */
public Varargs unpack(int i) {
return unpack(i, this.rawlen());
}
代码示例来源:origin: hsllany/HtmlNative
/** Unpack all the elements of this table */
public Varargs unpack() {
return unpack(1, this.rawlen());
}
代码示例来源:origin: M66B/XPrivacyLua
/** Unpack all the elements of this table */
public Varargs unpack() {
return unpack(1, this.rawlen());
}
代码示例来源:origin: M66B/XPrivacyLua
/** Unpack all the elements of this table from element i */
public Varargs unpack(int i) {
return unpack(i, this.rawlen());
}
代码示例来源:origin: M66B/XPrivacyLua
public int length() {
return m_metatable != null? len().toint(): rawlen();
}
代码示例来源:origin: hsllany/HtmlNative
public int length() {
return m_metatable != null? len().toint(): rawlen();
}
代码示例来源:origin: hsllany/HtmlNative
/** Insert an element at a position in a list-table
*
* @param pos the position to remove
* @param value The value to insert
*/
public void insert(int pos, LuaValue value) {
if ( pos == 0 )
pos = rawlen()+1;
while ( ! value.isnil() ) {
LuaValue v = rawget( pos );
rawset(pos++, value);
value = v;
}
}
代码示例来源:origin: M66B/XPrivacyLua
/** Insert an element at a position in a list-table
*
* @param pos the position to remove
* @param value The value to insert
*/
public void insert(int pos, LuaValue value) {
if ( pos == 0 )
pos = rawlen()+1;
while ( ! value.isnil() ) {
LuaValue v = rawget( pos );
rawset(pos++, value);
value = v;
}
}
代码示例来源:origin: hsllany/HtmlNative
public LuaValue len() {
final LuaValue h = metatag(LEN);
if (h.toboolean())
return h.call(this);
return LuaInteger.valueOf(rawlen());
}
代码示例来源:origin: M66B/XPrivacyLua
public LuaValue len() {
final LuaValue h = metatag(LEN);
if (h.toboolean())
return h.call(this);
return LuaInteger.valueOf(rawlen());
}
代码示例来源:origin: M66B/XPrivacyLua
/** Remove the element at a position in a list-table
*
* @param pos the position to remove
* @return The removed item, or {@link #NONE} if not removed
*/
public LuaValue remove(int pos) {
int n = rawlen();
if ( pos == 0 )
pos = n;
else if (pos > n)
return NONE;
LuaValue v = rawget(pos);
for ( LuaValue r=v; !r.isnil(); ) {
r = rawget(pos+1);
rawset(pos++, r);
}
return v.isnil()? NONE: v;
}
代码示例来源:origin: hsllany/HtmlNative
/** Remove the element at a position in a list-table
*
* @param pos the position to remove
* @return The removed item, or {@link #NONE} if not removed
*/
public LuaValue remove(int pos) {
int n = rawlen();
if ( pos == 0 )
pos = n;
else if (pos > n)
return NONE;
LuaValue v = rawget(pos);
for ( LuaValue r=v; !r.isnil(); ) {
r = rawget(pos+1);
rawset(pos++, r);
}
return v.isnil()? NONE: v;
}
内容来源于网络,如有侵权,请联系作者删除!