org.luaj.vm2.LuaTable.rawlen()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中org.luaj.vm2.LuaTable.rawlen()方法的一些代码示例,展示了LuaTable.rawlen()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LuaTable.rawlen()方法的具体详情如下:
包路径:org.luaj.vm2.LuaTable
类名称:LuaTable
方法名:rawlen

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;
}

相关文章

微信公众号

最新文章

更多