Class AbstractGroup.ChildArray

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Item>, Collection<Item>, List<Item>
Enclosing class:
AbstractGroup

protected class AbstractGroup.ChildArray extends NotableLinkedList<Item>
The array to hold children.
See Also:
  • Constructor Details

    • ChildArray

      protected ChildArray()
  • Method Details

    • onAdd

      protected void onAdd(Item newElement, Item followingElement)
      Description copied from class: NotableLinkedList
      Called each time an new element is about being added into the array.

      Deriving classes usually put checking codes here. And, throws exception if failure and nothing will be affected.

      Overrides:
      onAdd in class NotableLinkedList<Item>
      Parameters:
      newElement - the element to be added
      followingElement - the element that will 'follow' the new element. In other words, newElement will be inserted before followingElement. If null, it means newElement is appended at the end
    • onSet

      protected void onSet(Item newElement, Item replaced)
      Description copied from class: NotableLinkedList
      Called each time an element is about being assigned into the array and replace an existence one (by ListIterator.set).

      Deriving classes usually put checking codes here. And, throws exception if failure and nothing will be affected.

      Overrides:
      onSet in class NotableLinkedList<Item>
      Parameters:
      newElement - the element to be added
      replaced - the element to be replaced
    • onRemove

      protected void onRemove(Item item)
      Description copied from class: NotableLinkedList
      Called each time an element is about being removed from the array. Deriving classes usually put checking codes here. And, throws exception if failure.
      Overrides:
      onRemove in class NotableLinkedList<Item>