Varargs.checkint
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.luaj.vm2.Varargs.checkint (Showing top 20 results out of 315)

  • Common ways to obtain Varargs
private void myMethod () {
Varargs v =
  • LuaTable luaTable;LuaValue key;luaTable.next(key)
  • LuaTable luaTable;luaTable.unpack()
  • LuaTable.StrongSlot luaTableStrongSlot;luaTableStrongSlot.toVarargs()
  • Smart code suggestions by Codota
}
origin: info.bliki.wiki/bliki-core

  public Varargs invoke(Varargs args) {
    LuaTable t = args.checktable(1);
    switch (args.narg()) {
      case 1: return t.unpack();
      case 2: return t.unpack(args.checkint(2));
      default: return t.unpack(args.checkint(2), args.checkint(3));
    }
  }
}
origin: M66B/XPrivacyLua

  public Varargs invoke(Varargs args) {
    LuaTable t = args.checktable(1);
    switch (args.narg()) {
    case 1: return t.unpack();
    case 2: return t.unpack(args.checkint(2));
    default: return t.unpack(args.checkint(2), args.checkint(3));
    }
  }
}
origin: M66B/XPrivacyLua

  public Varargs invoke(Varargs args) {
    LuaValue func = args.checkfunction(1);
    int up = args.checkint(2);
    if ( func instanceof LuaClosure ) {
      LuaClosure c = (LuaClosure) func;
      if ( c.upValues != null && up > 0 && up <= c.upValues.length ) {
        return valueOf(c.upValues[up-1].hashCode());
      }
    }
    return NIL;
  }
}
origin: hsllany/HtmlNative

  public Varargs invoke(Varargs args) {
    LuaTable t = args.checktable(1);
    switch (args.narg()) {
    case 1: return t.unpack();
    case 2: return t.unpack(args.checkint(2));
    default: return t.unpack(args.checkint(2), args.checkint(3));
    }
  }
}
origin: hsllany/HtmlNative

  public Varargs invoke(Varargs args) {
    LuaValue func = args.checkfunction(1);
    int up = args.checkint(2);
    if ( func instanceof LuaClosure ) {
      LuaClosure c = (LuaClosure) func;
      if ( c.upValues != null && up > 0 && up <= c.upValues.length ) {
        return valueOf(c.upValues[up-1].hashCode());
      }
    }
    return NIL;
  }
}
origin: M66B/XPrivacyLua

static Varargs btest( Varargs args ) {
  int bits = -1;
  for ( int i = 1; i <= args.narg(); i++ ) {
    bits &= args.checkint(i);
  }
  return valueOf( bits != 0 );
}
origin: hsllany/HtmlNative

static Varargs band( Varargs args ) {
  int result = -1;
  for ( int i = 1; i <= args.narg(); i++ ) {
    result &= args.checkint(i);
  }
  return bitsToValue( result );
}
origin: hsllany/HtmlNative

static Varargs btest( Varargs args ) {
  int bits = -1;
  for ( int i = 1; i <= args.narg(); i++ ) {
    bits &= args.checkint(i);
  }
  return valueOf( bits != 0 );
}
origin: M66B/XPrivacyLua

static Varargs band( Varargs args ) {
  int result = -1;
  for ( int i = 1; i <= args.narg(); i++ ) {
    result &= args.checkint(i);
  }
  return bitsToValue( result );
}
origin: M66B/XPrivacyLua

static Varargs bxor( Varargs args ) {
  int result = 0;
  for ( int i = 1; i <= args.narg(); i++ ) {
    result ^= args.checkint(i);
  }
  return bitsToValue( result );
}
origin: M66B/XPrivacyLua

static Varargs bor( Varargs args ) {
  int result = 0;
  for ( int i = 1; i <= args.narg(); i++ ) {
    result |= args.checkint(i);
  }
  return bitsToValue( result );
}
origin: mirkosertic/GameComposer

static Varargs bxor( Varargs args ) {
  int result = 0;
  for ( int i = 1; i <= args.narg(); i++ ) {
    result ^= args.checkint(i);
  }
  return bitsToValue( result );
}
origin: hsllany/HtmlNative

static Varargs bor( Varargs args ) {
  int result = 0;
  for ( int i = 1; i <= args.narg(); i++ ) {
    result |= args.checkint(i);
  }
  return bitsToValue( result );
}
origin: M66B/XPrivacyLua

  public Varargs invoke(Varargs args) {
    int a=1;
    LuaThread thread = args.isthread(a)? args.checkthread(a++): globals.running; 
    int level = args.checkint(a++);
    int local = args.checkint(a++);
    CallFrame f = callstack(thread).getCallFrame(level);
    return f != null? f.getLocal(local): NONE;
  }
}
origin: mirkosertic/GameComposer

  @Override
  public Varargs invoke(Varargs args) {
    int a=1;
    LuaThread thread = args.isthread(a)? args.checkthread(a++): globals.running; 
    int level = args.checkint(a++);
    int local = args.checkint(a++);
    CallFrame f = callstack(thread).getCallFrame(level);
    return f != null? f.getLocal(local): NONE;
  }
}
origin: M66B/XPrivacyLua

  public Varargs invoke(Varargs args) {
    int a=1;
    LuaThread thread = args.isthread(a)? args.checkthread(a++): globals.running; 
    int level = args.checkint(a++);
    int local = args.checkint(a++);
    LuaValue value = args.arg(a++);
    CallFrame f = callstack(thread).getCallFrame(level); 
    return f != null? f.setLocal(local, value): NONE;
  }
}
origin: M66B/XPrivacyLua

  public Varargs invoke(Varargs args) {
    int n = args.narg();
    byte[] bytes = new byte[n];
    for ( int i=0, a=1; i<n; i++, a++ ) {
      int c = args.checkint(a);
      if (c<0 || c>=256) argerror(a, "invalid value");
      bytes[i] = (byte) c;
    }
    return LuaString.valueUsing( bytes );
  }
}
origin: M66B/XPrivacyLua

  public Varargs invoke(Varargs args) {
    LuaString s = args.checkstring( 1 );
    int n = args.checkint( 2 );
    final byte[] bytes = new byte[ s.length() * n ];
    int len = s.length();
    for ( int offset = 0; offset < bytes.length; offset += len ) {
      s.copyInto( 0, bytes, offset, len );
    }
    return LuaString.valueUsing( bytes );
  }
}
origin: hsllany/HtmlNative

  public Varargs invoke(Varargs args) {
    LuaString s = args.checkstring( 1 );
    int n = args.checkint( 2 );
    final byte[] bytes = new byte[ s.length() * n ];
    int len = s.length();
    for ( int offset = 0; offset < bytes.length; offset += len ) {
      s.copyInto( 0, bytes, offset, len );
    }
    return LuaString.valueUsing( bytes );
  }
}
origin: M66B/XPrivacyLua

  public Varargs invoke(Varargs args) {
    int n = args.narg()-1; 				
    if ( args.arg1().equals(valueOf("#")) )
      return valueOf(n);
    int i = args.checkint(1);
    if ( i == 0 || i < -n )
      argerror(1,"index out of range");
    return args.subargs(i<0? n+i+2: i+1);
  }
}
org.luaj.vm2Varargscheckint

Javadoc

Return argument i as a java int value, discarding any fractional part, or throw an error if not a number.

Popular methods of Varargs

  • arg1
  • arg
  • narg
  • checktable
  • checkstring
  • checkdouble
  • checkjstring
  • checkuserdata
  • checkvalue
  • eval
  • isTailcall
  • isnumber
  • isTailcall,
  • isnumber,
  • optint,
  • optjstring,
  • subargs,
  • tojstring,
  • checkclosure,
  • checkfunction,
  • checklong

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • findViewById (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Kernel (java.awt.image)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JComboBox (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)