Class ArraySearchResults

    • Constructor Detail

      • ArraySearchResults

        public ArraySearchResults​(String[] IDs)
        Constructor from MatchId array.
        Parameters:
        IDs - An array of MatchIDs.
    • Method Detail

      • getName

        public String getName()
        SearchResults method: A descriptive name for the collection.
        Specified by:
        getName in interface SearchResults
        Returns:
        A descriptive name for the collection.
      • setName

        public ArraySearchResults setName​(String newName)
        Setter for name: Name of result set.
        Parameters:
        newName - Name of result set.
      • getPageLength

        public int getPageLength()
        Getter for pageLength: The maximum number of results to return from next(), or 0 for no maximum.
        Specified by:
        getPageLength in interface SearchResults
        Returns:
        The maximum number of results to return from next(), or 0 for no maximum.
      • setPageLength

        public SearchResults setPageLength​(int newPageLength)
        Setter for pageLength: The maximum number of results to return from next(), or 0 for no maximum.
        Specified by:
        setPageLength in interface SearchResults
        Parameters:
        newPageLength - The maximum number of results to return from next(), or 0 for no maximum.
      • getLastMatchId

        public String getLastMatchId()
        Getter for lastMatchId: The ID of the last match the iterator returned from next()
        Specified by:
        getLastMatchId in interface SearchResults
        Returns:
        The ID of the last match the iterator returned from next()
      • reset

        public void reset()
        SearchResults method: Resets the iterator to the beginning of the list
        Specified by:
        reset in interface SearchResults
      • size

        public int size()
        SearchResults method: Returns the number of utterances in the collection.
        Specified by:
        size in interface SearchResults
        Returns:
        The number of utterances in the collection.
      • seek

        public boolean seek​(int n)
        Go to the nth item in the list, so it will be the next returned by next().
        Specified by:
        seek in interface SearchResults
        Parameters:
        n - The number of the item to seek to.
        Returns:
        true if the nth item exists, false otherwise.
      • hasNext

        public boolean hasNext()
        Iterator method: Returns true if the iteration has more elements.
        Specified by:
        hasNext in interface Iterator<String>
        Returns:
        true if the iteration has more elements.
      • next

        public String next()
        Iterator method: Returns the next result ID.
        Specified by:
        next in interface Iterator<String>
        Returns:
        The next result ID.
      • close

        public void close()
        Close all open resources (there are none).
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable