/** * Gets an immutable list of all attributes of the given type. The order of the returned list reflects the ordering of * the RDNs and their attributes. * * @param type Attribute type. * * @return Non-null list of attributes of given type. An empty list is returned if there are no attributes of the * given type. */ public List<String> getValues(final AttributeType type) { final List<String> values = new ArrayList<>(rdns.size()); for (RDN rdn : rdns) { values.addAll(rdn.getAttributes().getValues(type)); } return Collections.unmodifiableList(values); }