protected void ensureParentage ( AbstractNode child ) throws IllegalStateException { if ( child . parent == this ) return ; throw new IllegalStateException ( String . format ( "Can't disown child of type %s - it isn't my child (I'm a %s)" , child . getClass ( ) . getName ( ) , this . getClass ( ) . getName ( ) ) ) ; }
Checks if the provided node is a direct child of this node .