public void append(StringBuilder sb) { String del = ""; for (Map.Entry<PackageRef,Attrs> s : entrySet()) { sb.append(del); sb.append(s.getKey()); if (!s.getValue().isEmpty()) { sb.append(';'); s.getValue().append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<String,Attrs> s : entrySet()) { sb.append(del); sb.append(s.getKey()); if (!s.getValue().isEmpty()) { sb.append(';'); s.getValue().append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<PackageRef,Attrs> s : entrySet()) { sb.append(del); sb.append(s.getKey()); if (!s.getValue().isEmpty()) { sb.append(';'); s.getValue().append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<PackageRef,Attrs> s : entrySet()) { sb.append(del); sb.append(s.getKey()); if (!s.getValue().isEmpty()) { sb.append(';'); s.getValue().append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<PackageRef, Attrs> s : entrySet()) { sb.append(del); sb.append(s.getKey()); if (!s.getValue() .isEmpty()) { sb.append(';'); s.getValue() .append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<PackageRef, Attrs> s : entrySet()) { sb.append(del); sb.append(s.getKey()); if (!s.getValue() .isEmpty()) { sb.append(';'); s.getValue() .append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<String,Attrs> s : entrySet()) { sb.append(del); sb.append(Processor.removeDuplicateMarker(s.getKey())); if (!s.getValue().isEmpty()) { sb.append(';'); s.getValue().append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<String,Attrs> s : entrySet()) { sb.append(del); sb.append(Processor.removeDuplicateMarker(s.getKey())); if (!s.getValue().isEmpty()) { sb.append(';'); s.getValue().append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<String, Attrs> s : entrySet()) { String key = s.getKey(); Attrs value = s.getValue(); sb.append(del); sb.append(key, 0, keyLength(key)); if (!value.isEmpty()) { sb.append(';'); value.append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<String, Attrs> s : entrySet()) { String key = s.getKey(); Attrs value = s.getValue(); sb.append(del); sb.append(key, 0, keyLength(key)); if (!value.isEmpty()) { sb.append(';'); value.append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<String, Attrs> s : entrySet()) { String key = s.getKey(); Attrs value = s.getValue(); sb.append(del); sb.append(key, 0, keyLength(key)); if (!value.isEmpty()) { sb.append(';'); value.append(sb); } del = ","; } }
public void append(StringBuilder sb) { String del = ""; for (Map.Entry<String, Attrs> s : entrySet()) { String key = s.getKey(); Attrs value = s.getValue(); sb.append(del); sb.append(key, 0, keyLength(key)); if (!value.isEmpty()) { sb.append(';'); value.append(sb); } del = ","; } }
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; }
/** * Ensure that we are running on the correct bnd. */ protected void doRequireBnd() { Attrs require = OSGiHeader.parseProperties(getProperty(REQUIRE_BND)); if (require == null || require.isEmpty()) return; Hashtable<String, String> map = new Hashtable<>(); map.put(Constants.VERSION_FILTER, getBndVersion()); for (String filter : require.keySet()) { try { Filter f = new Filter(filter); if (f.match(map)) continue; error("%s fails for filter %s values=%s", REQUIRE_BND, require.get(filter), map); } catch (Exception t) { exception(t, "%s with value %s throws exception", REQUIRE_BND, require); } } }
/** * Ensure that we are running on the correct bnd. */ void doRequireBnd() { Attrs require = OSGiHeader.parseProperties(getProperty(REQUIRE_BND)); if (require == null || require.isEmpty()) return; Hashtable<String,String> map = new Hashtable<String,String>(); map.put(Constants.VERSION_FILTER, getBndVersion()); for (String filter : require.keySet()) { try { Filter f = new Filter(filter); if (f.match(map)) continue; error("%s fails %s", REQUIRE_BND, require.get(filter)); } catch (Exception t) { error("%s with value %s throws exception", t, REQUIRE_BND, require); } } }
/** * Ensure that we are running on the correct bnd. */ protected void doRequireBnd() { Attrs require = OSGiHeader.parseProperties(getProperty(REQUIRE_BND)); if (require == null || require.isEmpty()) return; Hashtable<String, String> map = new Hashtable<>(); map.put(Constants.VERSION_FILTER, getBndVersion()); for (String filter : require.keySet()) { try { Filter f = new Filter(filter); if (f.match(map)) continue; error("%s fails for filter %s values=%s", REQUIRE_BND, require.get(filter), map); } catch (Exception t) { exception(t, "%s with value %s throws exception", REQUIRE_BND, require); } } }
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; }