public boolean hasAttribute(String key) { boolean b; attributeLock.lock(); b = wrappedElement.hasAttribute(key); attributeLock.unlock(); return b; }
public boolean hasAttribute(String key, Class<?> clazz) { boolean b; attributeLock.lock(); b = wrappedElement.hasAttribute(key, clazz); attributeLock.unlock(); return b; }
public boolean hasAttribute(String key, Class<?> clazz) { boolean b; attributeLock.lock(); b = wrappedElement.hasAttribute(key, clazz); attributeLock.unlock(); return b; }
public boolean hasAttribute(String key) { boolean b; attributeLock.lock(); b = wrappedElement.hasAttribute(key); attributeLock.unlock(); return b; }
/** * Delete attributes used by this algorithm in elements of a graph * @param it the list of elements */ private void cleanElement(Iterable<? extends Element> it){ for(Element e : it){ if(e.hasAttribute(predAttributeName)) e.removeAttribute(predAttributeName); if(e.hasAttribute(sigmaAttributeName)) e.removeAttribute(sigmaAttributeName); if(e.hasAttribute(distAttributeName)) e.removeAttribute(distAttributeName); if(e.hasAttribute(deltaAttributeName)) e.removeAttribute(deltaAttributeName); } }
/** * Delete attributes used by this algorithm in elements of a graph * @param it the list of elements */ private void cleanElement(Iterable<? extends Element> it){ for(Element e : it){ if(e.hasAttribute(predAttributeName)) e.removeAttribute(predAttributeName); if(e.hasAttribute(sigmaAttributeName)) e.removeAttribute(sigmaAttributeName); if(e.hasAttribute(distAttributeName)) e.removeAttribute(distAttributeName); if(e.hasAttribute(deltaAttributeName)) e.removeAttribute(deltaAttributeName); } }
public boolean isAvailable(T e) { return e.hasAttribute(key) && (value == null ? e.getAttribute(key) == null : value .equals(e.getAttribute(key))); } }
public boolean isAvailable(T e) { return e.hasAttribute(key) && (value == null ? e.getAttribute(key) == null : value .equals(e.getAttribute(key))); } }
private void attributeDiff(ElementType type, Element e1, Element e2) { if (e1 == null && e2 == null) return; else if (e1 == null) { for (String key : e2.getAttributeKeySet()) events.add(new AttributeAdded(type, e2.getId(), key, e2 .getAttribute(key))); } else if (e2 == null) { for (String key : e1.getAttributeKeySet()) events.add(new AttributeRemoved(type, e1.getId(), key, e1 .getAttribute(key))); } else { for (String key : e2.getAttributeKeySet()) { if (e1.hasAttribute(key)) { Object o1 = e1.getAttribute(key); Object o2 = e2.getAttribute(key); if (!(o1 == null ? o2 == null : o1.equals(o2))) events.add(new AttributeChanged(type, e1.getId(), key, o2, o1)); } else events.add(new AttributeAdded(type, e1.getId(), key, e2 .getAttribute(key))); } for (String key : e1.getAttributeKeySet()) { if (!e2.hasAttribute(key)) events.add(new AttributeRemoved(type, e1.getId(), key, e1 .getAttribute(key))); } } }
private void attributeDiff(ElementType type, Element e1, Element e2) { if (e1 == null && e2 == null) return; else if (e1 == null) { for (String key : e2.getAttributeKeySet()) events.add(new AttributeAdded(type, e2.getId(), key, e2 .getAttribute(key))); } else if (e2 == null) { for (String key : e1.getAttributeKeySet()) events.add(new AttributeRemoved(type, e1.getId(), key, e1 .getAttribute(key))); } else { for (String key : e2.getAttributeKeySet()) { if (e1.hasAttribute(key)) { Object o1 = e1.getAttribute(key); Object o2 = e2.getAttribute(key); if (!(o1 == null ? o2 == null : o1.equals(o2))) events.add(new AttributeChanged(type, e1.getId(), key, o2, o1)); } else events.add(new AttributeAdded(type, e1.getId(), key, e2 .getAttribute(key))); } for (String key : e1.getAttributeKeySet()) { if (!e2.hasAttribute(key)) events.add(new AttributeRemoved(type, e1.getId(), key, e1 .getAttribute(key))); } } }