Class IList.IReadOnlyListFromArray<E>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.Deque<E>, java.util.List<E>, java.util.Queue<E>, java.util.RandomAccess, ICollection<E>
    Enclosing class:
    IList<E>

    protected static class IList.IReadOnlyListFromArray<E>
    extends IList.IReadOnlyList<E>
    See Also:
    Serialized Form
    • Field Detail

      • array

        E[] array
      • offset

        int offset
      • length

        int length
    • Constructor Detail

      • IReadOnlyListFromArray

        IReadOnlyListFromArray​(E[] array)
      • IReadOnlyListFromArray

        IReadOnlyListFromArray​(E[] array,
                               int offset,
                               int length)
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<E>
        Specified by:
        size in interface java.util.Deque<E>
        Specified by:
        size in interface java.util.List<E>
        Specified by:
        size in class IList<E>
      • doGet

        protected E doGet​(int index)
        Description copied from class: IList
        Helper method for getting an element from the list. This is the only method which really gets an element. Override if you need to validity checks before getting.
        Specified by:
        doGet in class IList<E>
        Parameters:
        index - index of element to return
        Returns:
        the element at the specified position in this list