public boolean isEquivalent(IOR ior) { Iterator<Object> myIterator = iterator(); Iterator<Object> otherIterator = ior.iterator(); while (myIterator.hasNext() && otherIterator.hasNext()) { TaggedProfile myProfile = (TaggedProfile) (myIterator.next()); TaggedProfile otherProfile = (TaggedProfile) (otherIterator.next()); if (!myProfile.isEquivalent(otherProfile)) return false; } return myIterator.hasNext() == otherIterator.hasNext(); }
public boolean isEquivalent(IOR ior) { Iterator<Object> myIterator = iterator(); Iterator<Object> otherIterator = ior.iterator(); while (myIterator.hasNext() && otherIterator.hasNext()) { TaggedProfile myProfile = (TaggedProfile) (myIterator.next()); TaggedProfile otherProfile = (TaggedProfile) (otherIterator.next()); if (!myProfile.isEquivalent(otherProfile)) return false; } return myIterator.hasNext() == otherIterator.hasNext(); }