Interesting dilemna. My parent object A contains a Collection of objects B. B must always maintain a reference to A (A is a member variable). B is uniquely identified by it's
String name within the context of its parent A (can only have one B object named Fred in A object alpha - can have another B object named Fred in A object bravo).
A objects are uniquely identified by their name AND their Collection of B objects.
B's equal method compares the name and then compares the A objects.
A's equal method compares the name and then the Collection.
When using a built in Collection compare method (such as Arrays.equals) for the A object, the compare method calls the B objects equals
test. The B equals test calls the A objects equals method, The A object calls the B objects equals test....
Infinite loop. Or am I missing something (haven't tested it yet)?
Thanks for the help!