Package gnu.mapping

Class ArgListVector

All Implemented Interfaces:
BoundedHashable, Array, AVector, Consumable, GVector, Sequence, ArgList, Externalizable, Serializable, Comparable, Iterable, Collection, List, RandomAccess, SequencedCollection

public class ArgListVector extends FVector implements ArgList
See Also:
  • Constructor Details

    • ArgListVector

      public ArgListVector(Object[] args, int firstKeyword, int numKeywords)
  • Method Details

    • getArgs

      public static ArgListVector getArgs(CallContext ctx)
    • prepend

      public static ArgListVector prepend(ArgListVector args, Object... extra)
    • drop

      public static ArgListVector drop(ArgList args, int toSkip)
    • numArguments

      public int numArguments()
      Description copied from interface: ArgList
      Number of actual arguments. Each (keyword,argument)-pair counts as one (not two).
      Specified by:
      numArguments in interface ArgList
    • getArgAsObject

      public Object getArgAsObject(int i)
      Description copied from interface: ArgList
      Index into arguments, not counting keywords. I.e. for [a b k1: c k2: d e] the index 0 returns a, 2 returns c, 3 returns d, 4 returns e.
      Specified by:
      getArgAsObject in interface ArgList
    • getKeyword

      public String getKeyword(int i)
      Description copied from interface: ArgList
      Get keyword (as an interned String) for given argument. Indexing is the same as getArgAsObject. Return null for non-keyword arguments.
      Specified by:
      getKeyword in interface ArgList
    • numKeywords

      public int numKeywords()
      Specified by:
      numKeywords in interface ArgList
    • firstKeyword

      public int firstKeyword()
      Specified by:
      firstKeyword in interface ArgList
    • findKeyword

      public int findKeyword(String key)
      Description copied from interface: ArgList
      Find index for keyword.
      Specified by:
      findKeyword in interface ArgList
      Parameters:
      key - an interned string