예제 #1
0
 /**
  * Retrieves the {@link javax.naming.directory.Attributes Attributes} view of the type/value
  * mappings contained in this Rdn.
  *
  * @return The non-null attributes containing the type/value mappings of this Rdn.
  */
 public Attributes toAttributes() {
   Attributes attrs = new BasicAttributes(true);
   for (int i = 0; i < entries.size(); i++) {
     RdnEntry entry = entries.get(i);
     Attribute attr = attrs.put(entry.getType(), entry.getValue());
     if (attr != null) {
       attr.add(entry.getValue());
       attrs.put(attr);
     }
   }
   return attrs;
 }