1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 09:45:39 +02:00

Added isChildOf method.

This commit is contained in:
Sergey Prigogin 2008-04-14 02:01:21 +00:00
parent 8e3b8e26e4
commit 555148b018

View file

@ -66,7 +66,20 @@ public abstract class PDOMNode implements IPDOMNode {
public int getRecord() {
return record;
}
/**
* Checks if <code>other</code> node is the immediate parent of this one.
* @param other paternity test subject.
* @return <code>true</code> if <code>other</code> node in the parent of this one.
*/
public boolean isChildOf(PDOMNode other) {
try {
return other.pdom == pdom && other.record == getParentNodeRec();
} catch (CoreException e) {
return false;
}
}
@Override
public final boolean equals(Object obj) {
if (obj == this)