boolean (Object o) { if (o instanceof MyNodeWrapper) { return Comparing.equal(unwrapElement(getValue()), unwrapElement(((MyNodeWrapper)o).getValue())); } if (o instanceof StructureViewTreeElement) { return Comparing.equal(unwrapElement(getValue()), ((StructureViewTreeElement)o).getValue()); } return false; }