Class BodyPartsList

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

    class BodyPartsList
    extends java.util.ArrayList<BodyPart>
    Custom List implementation that maintains parentage information automatically.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) MultiPart parent  
      • 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, BodyPart bp)  
      boolean add​(BodyPart bp)  
      boolean addAll​(int index, java.util.Collection<? extends BodyPart> bps)  
      boolean addAll​(java.util.Collection<? extends BodyPart> bps)  
      void clear()  
      BodyPart remove​(int index)  
      boolean remove​(java.lang.Object bp)  
      • 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, set, 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

      • BodyPartsList

        BodyPartsList​(MultiPart parent)
    • Method Detail

      • add

        public boolean add​(BodyPart bp)
        Specified by:
        add in interface java.util.Collection<BodyPart>
        Specified by:
        add in interface java.util.List<BodyPart>
        Overrides:
        add in class java.util.ArrayList<BodyPart>
      • add

        public void add​(int index,
                        BodyPart bp)
        Specified by:
        add in interface java.util.List<BodyPart>
        Overrides:
        add in class java.util.ArrayList<BodyPart>
      • addAll

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

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

        public void clear()
        Specified by:
        clear in interface java.util.Collection<BodyPart>
        Specified by:
        clear in interface java.util.List<BodyPart>
        Overrides:
        clear in class java.util.ArrayList<BodyPart>
      • remove

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

        public boolean remove​(java.lang.Object bp)
        Specified by:
        remove in interface java.util.Collection<BodyPart>
        Specified by:
        remove in interface java.util.List<BodyPart>
        Overrides:
        remove in class java.util.ArrayList<BodyPart>