public boolean isEquivalent(IORFactory other) { if (!(other instanceof IORTemplate)) return false; IORTemplate list = (IORTemplate) other; Iterator<Object> thisIterator = iterator(); Iterator<Object> listIterator = list.iterator(); while (thisIterator.hasNext() && listIterator.hasNext()) { TaggedProfileTemplate thisTemplate = (TaggedProfileTemplate) thisIterator.next(); TaggedProfileTemplate listTemplate = (TaggedProfileTemplate) listIterator.next(); if (!thisTemplate.isEquivalent(listTemplate)) return false; } return (thisIterator.hasNext() == listIterator.hasNext()) && getObjectKeyTemplate().equals(list.getObjectKeyTemplate()); }
public boolean isEquivalent(IORFactory other) { if (!(other instanceof IORTemplate)) return false; IORTemplate list = (IORTemplate) other; Iterator<Object> thisIterator = iterator(); Iterator<Object> listIterator = list.iterator(); while (thisIterator.hasNext() && listIterator.hasNext()) { TaggedProfileTemplate thisTemplate = (TaggedProfileTemplate) thisIterator.next(); TaggedProfileTemplate listTemplate = (TaggedProfileTemplate) listIterator.next(); if (!thisTemplate.isEquivalent(listTemplate)) return false; } return (thisIterator.hasNext() == listIterator.hasNext()) && getObjectKeyTemplate().equals(list.getObjectKeyTemplate()); }