Class BBArrayList<T>

    • Constructor Detail

    • Method Detail

      • addItem

        public boolean addItem​(T element)
        Calls the ArrayList.add(Object) method.
        Parameters:
        element - The element to be appended to this list
        Returns:
        true (as specified by Collection.add(E))
      • getItem

        public T getItem​(int index)
        Calls the ArrayList.get(int) method.
        Parameters:
        index - The index of the element to return.
        Returns:
        the element at the specified position in this list.
      • insertItem

        public void insertItem​(int index,
                               T element)
        Calls the ArrayList.add(int, Object) method.
        Parameters:
        index - The index at which the specified element is to be inserted.
        element - The object to be inserted.
      • removeItem

        public Object removeItem​(int index)
        Calls the ArrayList.remove(int) method.
        Parameters:
        index - The index of the element to be removed.
        Returns:
        element The element that was removed from the list.
      • setItem

        public Object setItem​(int index,
                              T element)
        Calls the ArrayList.set(int, Object) method.
        Parameters:
        index - The index of the element to replace.
        element - The element to be stored at the specified position
        Returns:
        the element previously at the specified position.