code: public static String copyDirective(HashMap<String, String> src,
              HashMap<String, String> dst, String directive) {
          String directiveValue = src.get(directive);
          if (directiveValue != null) {
              dst.put(directive, directiveValue);
          }
  
          return directiveValue;
      }
docs: Copy the directive from the source map to the destination map, if it's
  value isn't null.
  (A directive is a parameter of the digest authentication process.)
  
  @param src the source map
  @param dst the destination map
  @param directive the directive name
  @return the value of the copied directive