Package gnu.mapping

Class ArgListPair

All Implemented Interfaces:
BoundedHashable, Consumable, Sequence<Object>, ArgList, Externalizable, Serializable, Comparable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess, SequencedCollection<Object>

public class ArgListPair extends ImmutablePair implements ArgList, RandomAccess
See Also:
  • Constructor Details

    • ArgListPair

      protected ArgListPair(ArgListVector base, int skip)
  • Method Details

    • getArgs

      public static LList getArgs(CallContext ctx)
    • valueOf

      public static LList valueOf(ArgListVector args)
    • valueOf

      public static LList valueOf(ArgListVector args, int skip)
    • 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
    • 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
    • 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
    • numKeywords

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

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

      public int size()
      Description copied from interface: Sequence
      See java.util.List.
      Specified by:
      size in interface Collection<Object>
      Specified by:
      size in interface List<Object>
      Specified by:
      size in interface Sequence<Object>
      Overrides:
      size in class Pair
    • get

      public Object get(int index)
      Description copied from interface: Sequence
      See java.util.List.
      Specified by:
      get in interface List<Object>
      Specified by:
      get in interface Sequence<Object>
      Overrides:
      get in class Pair
    • getCdr

      public Object getCdr()
      Overrides:
      getCdr in class Pair