public Group commonParent ( Group other ) { if ( isParent ( other ) ) return this ; if ( other . isParent ( this ) ) return other ; while ( ! other . isParent ( this ) ) other = other . getParentGroup ( ) ; return other ; }
Get the common parent of this and the other group . Cant fail since the root group is always a parent of any 2 groups .