Class Varargs.ArrayVarargs

java.lang.Object
com.prineside.luaj.Varargs
com.prineside.luaj.Varargs.ArrayVarargs
Enclosing class:
Varargs

public static final class Varargs.ArrayVarargs extends Varargs
Varargs implemenation backed by an array of LuaValues

This is an internal class not intended to be used directly. Instead use the corresponding static methods on LuaValue.

  • Method Details

    • arg

      public LuaValue arg(int i)
      Description copied from class: Varargs
      Get the n-th argument value (1-based).
      Specified by:
      arg in class Varargs
      Parameters:
      i - the index of the argument to get, 1 is the first argument
      Returns:
      Value at position i, or LuaValue.NIL if there is none.
      See Also:
    • narg

      public int narg()
      Description copied from class: Varargs
      Get the number of arguments, or 0 if there are none.
      Specified by:
      narg in class Varargs
      Returns:
      number of arguments.
    • arg1

      public LuaValue arg1()
      Description copied from class: Varargs
      Get the first argument in the list.
      Specified by:
      arg1 in class Varargs
      Returns:
      LuaValue which is first in the list, or LuaValue.NIL if there are no values.
      See Also:
    • subargs

      public Varargs subargs(int start)
      Description copied from class: Varargs
      Create a Varargs instance containing arguments starting at index start
      Specified by:
      subargs in class Varargs
      Parameters:
      start - the index from which to include arguments, where 1 is the first argument.
      Returns:
      Varargs containing argument { start, start+1, ... , narg-start-1 }