Package gnu.mapping

Class ArgListVector

    • Constructor Detail

      • ArgListVector

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

      • 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
      • 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