@Override public Map<String, Object> getInheritableAttributes() { final CompositeAttributeMap compositeMap = (CompositeAttributeMap)attributes; return compositeMap.getAllInheritable(); }
public Map<String, CompositeAttributeHolder> getInheritableAttributeHolders() { final CompositeAttributeMap compositeMap = (CompositeAttributeMap)attributes; return compositeMap.getAllInheritableAttributeHolders(); }
@Override protected AttributeMap createAttributeMap() { return new CompositeAttributeMap(); } }
final CompositeAttributeHolder original = (CompositeAttributeHolder)value; final CompositeAttributeHolder copy = (CompositeAttributeHolder)original.clone(); getAttributes().put(key, copy); copy.lock(); getAttributes().put(key, copy); set(key, value);
/** * Gets an immutable view of the attribute map with the inheritable attribute holders * @return map of inheritable attributes */ public Map<String, CompositeAttributeHolder> getAllInheritableAttributeHolders() { return Maps.filterValues(findCompositeAttributes(), new Predicate<CompositeAttributeHolder>() { public boolean apply(final CompositeAttributeHolder holder) { return holder.isInheritable(); } }); }
/** * Generate a new map of key -> value containing all inheritable attributes * @return map of inheritable attributes */ public Map<String, Object> getAllInheritable() { final Map<String, Object> allInheritable = new HashMap<String, Object>(); for (final Entry<String, CompositeAttributeHolder> entry : findCompositeAttributes().entrySet()) { final CompositeAttributeHolder attribute = entry.getValue(); if (attribute.isInheritable()) { allInheritable.put(entry.getKey(), attribute.getValue()); } } return allInheritable; }
public Map<String, Object> getInheritableAttributes() { final CompositeAttributeMap compositeMap = (CompositeAttributeMap)attributes; return compositeMap.getAllInheritable(); }
@Override public Map<String, CompositeAttributeHolder> getInheritableAttributeHolders() { final CompositeAttributeMap compositeMap = (CompositeAttributeMap)attributes; return compositeMap.getAllInheritableAttributeHolders(); } }