Class SimpleArrayList.Partition<K>

  • All Implemented Interfaces:
    java.lang.Iterable<K>, java.util.Collection<K>, java.util.List<K>
    Enclosing class:
    SimpleArrayList<T>

    class SimpleArrayList.Partition<K>
    extends SimpleArrayList<K>
    • Field Detail

      • from_

        private final int from_
      • size_

        private final int size_
    • Method Detail

      • add

        public boolean add​(K o)
        Description copied from class: SimpleArrayList
        Add an element to the end of the list
        Specified by:
        add in interface java.util.Collection<K>
        Specified by:
        add in interface java.util.List<K>
        Overrides:
        add in class SimpleArrayList<K>
        Parameters:
        o - the element to add
        Returns:
        true if added and for this impl it is always true
      • get

        public K get​(int index)
        Description copied from class: SimpleArrayList
        Return an element at index. No range checks at all.
        Specified by:
        get in interface java.util.List<K>
        Overrides:
        get in class SimpleArrayList<K>
        Parameters:
        index - the position
        Returns:
        the element at this position
      • size

        public int size()
        Description copied from class: SimpleArrayList
        Returns the size of this list
        Specified by:
        size in interface java.util.Collection<K>
        Specified by:
        size in interface java.util.List<K>
        Overrides:
        size in class SimpleArrayList<K>
      • toArray

        public K[] toArray()
        Description copied from class: SimpleArrayList
        Creates an array of the elements. This is a copy operation!
        Specified by:
        toArray in interface java.util.Collection<K>
        Specified by:
        toArray in interface java.util.List<K>
        Overrides:
        toArray in class SimpleArrayList<K>
        Returns:
        an array of the elements