private boolean hasAsParent(INode child,ICompositeNode directParent){
  INode parent=child;
  while (parent != null) {
    if (parent == directParent)     return true;
    parent=parent.getParent();
  }
  return false;
}

private boolean hasAsParent ( INode child , ICompositeNode directParent ) { INode parent = child ; while ( parent != null ) { if ( parent == directParent ) return true ; parent = parent . getParent ( ) ; } return false ; }
test if directparent is in parent - chain .
