private void copyAttributes(AttributeMap dest,AttributeMap source){
  for (  Entry<Attribute<?>,?> a : source.entrySet()) {
    dest.put((Attribute<Object>)a.getKey(),a.getValue());
  }
}

private void copyAttributes ( AttributeMap dest , AttributeMap source ) { for ( Entry < Attribute < ? > , ? > a : source . entrySet ( ) ) { dest . put ( ( Attribute < Object > ) a . getKey ( ) , a . getValue ( ) ) ; } }
copy attribute from source attributemap to destination attributemap .
