Class Internal.ListAdapter<F,​T>

  • All Implemented Interfaces:
    Iterable<T>, Collection<T>, List<T>
    Enclosing class:
    Internal

    public static class Internal.ListAdapter<F,​T>
    extends AbstractList<T>
    Provides an immutable view of List<T> around a List<F>.

    Protobuf internal. Used in protobuf generated code only.

    • Method Detail

      • get

        public T get​(int index)
        Description copied from class: AbstractList
        Returns the element at the specified position in this list.
        Specified by:
        get in interface List<F>
        Specified by:
        get in class AbstractList<T>
        Parameters:
        index - index of the element to return
        Returns:
        the element at the specified position in this list
      • size

        public int size()
        Description copied from class: AbstractCollection
        Returns the number of elements in this collection. If this collection contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
        Specified by:
        size in interface Collection<F>
        Specified by:
        size in interface List<F>
        Specified by:
        size in class AbstractCollection<T>
        Returns:
        the number of elements in this collection