Interface QueryList<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T get​(long index)
      Get an item in the list, or throw an exception if this instance is no longer valid or cannot provide the item.
      long size()
      Get the total size of this list.
    • Method Detail

      • size

        long size()
        Get the total size of this list.

        For any given QueryList instance, this method is expected to return a the same value if invoked multiple times. Therefore, callers may safely choose to invoke it only once on a given instance and cache the result.

        Returns:
        total size of list
      • get

        T get​(long index)
        throws InvalidQueryListException
        Get an item in the list, or throw an exception if this instance is no longer valid or cannot provide the item.
        Parameters:
        index - index of the item (zero-based)
        Returns:
        the list item at index
        Throws:
        IndexOutOfBoundsException - if index is less than zero or greater than or equal to size()
        InvalidQueryListException - if this list has become invalid or cannot provide the item