public boolean isEqual(Attrs other) { if (this == other) return true; if (other == null || size() != other.size()) return false; if (isEmpty()) return true; TreeSet<String> l = new TreeSet<String>(keySet()); TreeSet<String> lo = new TreeSet<String>(other.keySet()); if (!l.equals(lo)) return false; for (String key : keySet()) { String value = get(key); String valueo = other.get(key); if (!(value == valueo || (value != null && value.equals(valueo)))) return false; } return true; }
public boolean isEqual(Attrs other) { if (this == other) return true; if (other == null || size() != other.size()) return false; if (isEmpty()) return true; TreeSet<String> l = new TreeSet<String>(keySet()); TreeSet<String> lo = new TreeSet<String>(other.keySet()); if (!l.equals(lo)) return false; for (String key : keySet()) { String value = get(key); String valueo = other.get(key); if (!(value == valueo || (value != null && value.equals(valueo)))) return false; } return true; }
public boolean isEqual(Attrs other) { if (this == other) return true; if (other == null || size() != other.size()) return false; if (isEmpty()) return true; TreeSet<String> l = new TreeSet<>(keySet()); TreeSet<String> lo = new TreeSet<>(other.keySet()); if (!l.equals(lo)) return false; for (String key : keySet()) { if (!Objects.equals(get(key), other.get(key))) { return false; } if (getType(key) != other.getType(key)) { return false; } } return true; }
public boolean isEqual(Attrs other) { if (this == other) return true; if (other == null || size() != other.size()) return false; if (isEmpty()) return true; TreeSet<String> l = new TreeSet<>(keySet()); TreeSet<String> lo = new TreeSet<>(other.keySet()); if (!l.equals(lo)) return false; for (String key : keySet()) { if (!Objects.equals(get(key), other.get(key))) { return false; } if (getType(key) != other.getType(key)) { return false; } } return true; }
public boolean isEqual(Attrs other) { if (this == other) return true; if (other == null || size() != other.size()) return false; if (isEmpty()) return true; TreeSet<String> l = new TreeSet<>(keySet()); TreeSet<String> lo = new TreeSet<>(other.keySet()); if (!l.equals(lo)) return false; for (String key : keySet()) { if (!Objects.equals(get(key), other.get(key))) { return false; } if (getType(key) != other.getType(key)) { return false; } } return true; }
public boolean isEqual(Attrs other) { if (this == other) return true; if (other == null || size() != other.size()) return false; if (isEmpty()) return true; TreeSet<String> l = new TreeSet<>(keySet()); TreeSet<String> lo = new TreeSet<>(other.keySet()); if (!l.equals(lo)) return false; for (String key : keySet()) { if (!Objects.equals(get(key), other.get(key))) { return false; } if (getType(key) != other.getType(key)) { return false; } } return true; }
public boolean isEqual(Attrs o) { if (this == o) return true; Attrs other = o; if (size() != other.size()) return false; if (isEmpty()) return true; SortedList<String> l = new SortedList<String>(keySet()); SortedList<String> lo = new SortedList<String>(other.keySet()); if (!l.isEqual(lo)) return false; for (String key : keySet()) { if (!get(key).equals(other.get(key))) return false; } return true; }
private void mergeAttributesAndDirectives(Annotation a) { String fqn = a.getName() .getFQN(); switch (fqn) { case STD_CAPABILITIES : case STD_REQUIREMENTS : Object[] annotations = a.get("value"); for (int i = 0; i < annotations.length; i++) { mergeAttributesAndDirectives((Annotation) annotations[i]); } break; default : if (!attributesAndDirectives.isEmpty()) { Object[] original = a.get("attribute"); int length = (original != null) ? original.length : 0; Object[] updated = new Object[length + attributesAndDirectives.size()]; if (length > 0) { System.arraycopy(original, 0, updated, 0, length); } for (String key : attributesAndDirectives.keySet()) { updated[length++] = attributesAndDirectives.toString(key); } a.put("attribute", updated); } break; } }
private void mergeAttributesAndDirectives(Annotation a) { String fqn = a.getName() .getFQN(); switch (fqn) { case STD_CAPABILITIES : case STD_REQUIREMENTS : Object[] annotations = a.get("value"); for (int i = 0; i < annotations.length; i++) { mergeAttributesAndDirectives((Annotation) annotations[i]); } break; default : if (!attributesAndDirectives.isEmpty()) { Object[] original = a.get("attribute"); int length = (original != null) ? original.length : 0; Object[] updated = new Object[length + attributesAndDirectives.size()]; if (length > 0) { System.arraycopy(original, 0, updated, 0, length); } for (String key : attributesAndDirectives.keySet()) { updated[length++] = attributesAndDirectives.toString(key); } a.put("attribute", updated); } break; } }
if (attrs != null && attrs.size() > 1) return;
if (attrs != null && attrs.size() > 1) return;