- Direct Known Subclasses:
The standard implementation of a diff container element.
This class may be instantiated, or further subclassed.
Method SummaryModifier and TypeMethodDescription
voidAdds the given child to this container.Tries to find the child with the given name.Returns the children of this container.
booleanReturns whether this container has at least one child.
voidRemoves the given child (non-recursively) from this container.
voidRemoves the given child from this container.
Methods inherited from class org.eclipse.compare.structuremergeviewer.DiffElement
getImage, getKind, getParent, getType, setKind, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.compare.structuremergeviewer.IDiffElement
getKind, getParent, setParent
(IDiffContainer parent, int kind)Creates a new container with the specified kind under the given parent.
parent- under which the new container is added as a child or
kind- of difference (defined in
findChildTries to find the child with the given name. Returns
nullif no such child exists.
name- of the child to find
- the first element with a matching name
addpublic void add
(IDiffElement diff)Adds the given child to this container. If the child is already contained in this container, this method has no effect.
removeToRootpublic void removeToRoot
(IDiffElement child)Removes the given child from this container. If the container becomes empty it is removed from its container. If the child is not contained in this container, this method has no effect.
removepublic void remove
(IDiffElement child)Removes the given child (non-recursively) from this container.
child- to remove
hasChildrenpublic boolean hasChildren()Returns whether this container has at least one child. In some cases this methods avoids having to call the potential more costly
getChildrenpublic IDiffElement getChildren()Returns the children of this container. If this container has no children an empty array is returned (not