public abstract class DiffContainer extends DiffElement implements IDiffContainer
This class may be instantiated, or further subclassed.
FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE| Constructor and Description |
|---|
DiffContainer(IDiffContainer parent,
int kind)
Creates a new container with the specified kind under the given parent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(IDiffElement diff)
Adds the given child to this container.
|
IDiffElement |
findChild(String name)
Tries to find the child with the given name.
|
IDiffElement[] |
getChildren()
Returns the children of this container.
|
boolean |
hasChildren()
Returns whether this container has at least one child.
|
void |
remove(IDiffElement child)
Removes the given child (non-recursively) from this container.
|
void |
removeToRoot(IDiffElement child)
Removes the given child from this container.
|
getImage, getKind, getParent, getType, setKind, setParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKind, getParent, setParentgetImage, getName, getTypepublic DiffContainer(IDiffContainer parent, int kind)
parent - under which the new container is added as a child or null.kind - of difference (defined in Differencer).public IDiffElement findChild(String name)
null if no such child exists.name - of the child to findpublic void add(IDiffElement diff)
IDiffContaineradd in interface IDiffContainerdiff - the child to be added to this containerpublic void removeToRoot(IDiffElement child)
IDiffContainerremoveToRoot in interface IDiffContainerchild - the child to be removed from this containerpublic void remove(IDiffElement child)
child - to removepublic boolean hasChildren()
IDiffContainergetChildren method.hasChildren in interface IDiffContainertrue if this container has at least one childpublic IDiffElement[] getChildren()
IDiffContainernull).getChildren in interface IDiffContainerGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.