Class BackedList

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

    public class BackedList
    extends java.util.ArrayList

    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.

    Version:
    $Revision: 1.14 $
    Author:
    James Strachan
    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, java.lang.Object object)  
      boolean add​(java.lang.Object object)  
      boolean addAll​(int index, java.util.Collection collection)  
      boolean addAll​(java.util.Collection collection)  
      void addLocal​(java.lang.Object object)
      Performs a local addition which is not forward through to the Branch or backing list
      protected Node asNode​(java.lang.Object object)  
      void clear()  
      java.lang.Object remove​(int index)  
      boolean remove​(java.lang.Object object)  
      java.lang.Object set​(int index, java.lang.Object object)  
      • 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 branchContent)
      • BackedList

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

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

      • add

        public boolean add​(java.lang.Object object)
        Specified by:
        add in interface java.util.Collection
        Specified by:
        add in interface java.util.List
        Overrides:
        add in class java.util.ArrayList
      • add

        public void add​(int index,
                        java.lang.Object object)
        Specified by:
        add in interface java.util.List
        Overrides:
        add in class java.util.ArrayList
      • set

        public java.lang.Object set​(int index,
                                    java.lang.Object object)
        Specified by:
        set in interface java.util.List
        Overrides:
        set in class java.util.ArrayList
      • remove

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

        public java.lang.Object remove​(int index)
        Specified by:
        remove in interface java.util.List
        Overrides:
        remove in class java.util.ArrayList
      • addAll

        public boolean addAll​(java.util.Collection collection)
        Specified by:
        addAll in interface java.util.Collection
        Specified by:
        addAll in interface java.util.List
        Overrides:
        addAll in class java.util.ArrayList
      • addAll

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

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

        public void addLocal​(java.lang.Object object)
        Performs a local addition which is not forward through to the Branch or backing list
        Parameters:
        object - DOCUMENT ME!
      • asNode

        protected Node asNode​(java.lang.Object object)