Interface ModifiableHierarchy<O>

  • Type Parameters:
    O - Object type
    All Superinterfaces:
    Hierarchy<O>
    All Known Implementing Classes:
    HashMapHierarchy, VisualizationTree

    public interface ModifiableHierarchy<O>
    extends Hierarchy<O>
    Modifiable Hierarchy.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Method Detail

      • add

        boolean add​(O parent,
                    O child)
        Add a parent-child relationship.
        Parameters:
        parent - Parent
        child - Child
        Returns:
        true if changed
      • add

        boolean add​(O entry)
        Add an entry (initializes data structures).
        Parameters:
        entry - Entry
        Returns:
        true if changed
      • remove

        boolean remove​(O parent,
                       O child)
        Remove a parent-child relationship.
        Parameters:
        parent - Parent
        child - Child
        Returns:
        true if changed
      • remove

        boolean remove​(O entry)
        Remove an entry and all its parent-child relationships.
        Parameters:
        entry - Entry
        Returns:
        true if changed
      • removeSubtree

        boolean removeSubtree​(O entry)
        Remove an entry and it's whole subtree (unless the elements are reachable by a different path!)
        Parameters:
        entry - Entry
        Returns:
        true if changed