Class BackedList<T extends Node>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess

    public class BackedList<T extends Node>
    extends java.util.ArrayList<T>

    BackedList represents a list of content of a Branch. Changes to the list will be reflected in the branch, though changes to the branch will not be reflected in this list.

    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, T node)  
      boolean add​(T node)  
      boolean addAll​(int index, java.util.Collection<? extends T> collection)  
      boolean addAll​(java.util.Collection<? extends T> collection)  
      void addLocal​(T node)
      Performs a local addition which is not forward through to the Branch or backing list
      void clear()  
      T remove​(int index)  
      boolean remove​(java.lang.Object object)  
      T set​(int index, T node)  
      • Methods inherited from class java.util.ArrayList

        clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Constructor Detail

      • BackedList

        public BackedList​(AbstractBranch branch,
                          java.util.List<Node> branchContent)
      • BackedList

        public BackedList​(AbstractBranch branch,
                          java.util.List<Node> branchContent,
                          int capacity)
      • BackedList

        public BackedList​(AbstractBranch branch,
                          java.util.List<Node> branchContent,
                          java.util.List<T> initialContent)
    • Method Detail

      • add

        public boolean add​(T node)
        Specified by:
        add in interface java.util.Collection<T extends Node>
        Specified by:
        add in interface java.util.List<T extends Node>
        Overrides:
        add in class java.util.ArrayList<T extends Node>
      • add

        public void add​(int index,
                        T node)
        Specified by:
        add in interface java.util.List<T extends Node>
        Overrides:
        add in class java.util.ArrayList<T extends Node>
      • set

        public T set​(int index,
                     T node)
        Specified by:
        set in interface java.util.List<T extends Node>
        Overrides:
        set in class java.util.ArrayList<T extends Node>
      • remove

        public boolean remove​(java.lang.Object object)
        Specified by:
        remove in interface java.util.Collection<T extends Node>
        Specified by:
        remove in interface java.util.List<T extends Node>
        Overrides:
        remove in class java.util.ArrayList<T extends Node>
      • remove

        public T remove​(int index)
        Specified by:
        remove in interface java.util.List<T extends Node>
        Overrides:
        remove in class java.util.ArrayList<T extends Node>
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> collection)
        Specified by:
        addAll in interface java.util.Collection<T extends Node>
        Specified by:
        addAll in interface java.util.List<T extends Node>
        Overrides:
        addAll in class java.util.ArrayList<T extends Node>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends T> collection)
        Specified by:
        addAll in interface java.util.List<T extends Node>
        Overrides:
        addAll in class java.util.ArrayList<T extends Node>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<T extends Node>
        Specified by:
        clear in interface java.util.List<T extends Node>
        Overrides:
        clear in class java.util.ArrayList<T extends Node>
      • addLocal

        public void addLocal​(T node)
        Performs a local addition which is not forward through to the Branch or backing list
        Parameters:
        node - DOCUMENT ME!