Class SimpleQueryList<T>

    • Constructor Detail

      • SimpleQueryList

        public SimpleQueryList​(List<? extends T> list)
        Constructor.
        Parameters:
        list - backing list
        Throws:
        IllegalArgumentException - if list is null
    • Method Detail

      • size

        public long size()
        Description copied from interface: QueryList
        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.

        Specified by:
        size in interface QueryList<T>
        Returns:
        total size of list
      • get

        public T get​(long index)
        Description copied from interface: QueryList
        Get an item in the list, or throw an exception if this instance is no longer valid or cannot provide the item.
        Specified by:
        get in interface QueryList<T>
        Parameters:
        index - index of the item (zero-based)
        Returns:
        the list item at index