/** @return true if at lest one attribute changed */ public boolean attacheAttrs(XMLMapAttr attrs) { if ((attrs == null) || attrs.isEmpty()) { return false; } if (foAttrs == null) { foAttrs = new XMLMapAttr(); } Iterator it = attrs.entrySet().iterator(); boolean ch = false; while (it.hasNext()) { Map.Entry attrEntry = (Map.Entry) it.next(); Object prev = foAttrs.put(attrEntry.getKey(), attrEntry.getValue()); ch |= (prev == null && attrEntry.getValue() != null) || !prev.equals(attrEntry.getValue()); } return ch; }
public void attacheAttrs (XMLMapAttr attrs) { if ( attrs == null || attrs.isEmpty()) { return; } if (foAttrs == null) foAttrs = new XMLMapAttr (); Iterator it = attrs.entrySet ().iterator (); while (it.hasNext()) { Map.Entry attrEntry = (Map.Entry )it.next(); foAttrs.put (attrEntry.getKey(), attrEntry.getValue()); } }
public void attacheAttrs (XMLMapAttr attrs) { if ( attrs == null || attrs.isEmpty()) { return; } if (foAttrs == null) foAttrs = new XMLMapAttr (); Iterator it = attrs.entrySet ().iterator (); while (it.hasNext()) { Map.Entry attrEntry = (Map.Entry )it.next(); foAttrs.put (attrEntry.getKey(), attrEntry.getValue()); } }