Returns true if prospectiveChild can be legally added to parent. False is returned if:
prospectiveChild
parent
Throws an error if parent or prospectiveChild is null/undefined.
Parent to add to
Prospective child
Equality function
Returns true if
prospectiveChildcan be legally added toparent. False is returned if:parentandprospectiveChildare equalparentalready containsprospectiveChildprospectiveChildhasparentas its own childThrows an error if
parentorprospectiveChildis null/undefined.