private static final Map<String, Object> subsetAttributes(
     final CommonInfo igc, final Collection<String> keysToPreserve) {
   Map<String, Object> attributes = new HashMap<String, Object>(keysToPreserve.size());
   for (final String key : keysToPreserve) {
     if (igc.hasAttribute(key)) attributes.put(key, igc.getAttribute(key));
   }
   return attributes;
 }
Exemplo n.º 2
0
 public boolean hasAttribute(String key) {
   return commonInfo.hasAttribute(key);
 }