code: public void mergeLinks(HalResource<?> embedded) {
      for (Entry<HalRelation, Set<String>> linkentry : embedded.linker.linkedResources.entrySet()) {
        Set<String> linkedIdSet = linkedResources.get(linkentry.getKey());
        if(linkedIdSet != null) {
          linkedIdSet.addAll(linkentry.getValue());
        }else {
          linkedResources.put(linkentry.getKey(), linkentry.getValue());
        }
      }
    }
docs: merge the links of an embedded resource into this linker.
  This is useful when building resources which are actually resource collections.
  You can then merge the relations of all resources in the collection and the unique the set of linked resources to embed.
  
  @param embedded the embedded resource for which the links should be merged into this linker.