Package org.cryptacular.x509.dn
Class RDNSequence
java.lang.Object
org.cryptacular.x509.dn.RDNSequence
Simple implementation of the X.501 RDNSequence type described in section 4.1.2.4 of RFC 2459.
- Author:
- Middleware Services
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an RDN to the sequence.backward()
getValue
(AttributeType type) Gets the first value of the given type that appears in the attribute list of any RDN in the sequence.getValues
(AttributeType type) Gets an immutable list of all attributes of the given type.iterator()
toString()
Creates a comma-separated list of TYPE=VALUE tokens from the attributes in the list in order.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RDNSequence
public RDNSequence()
-
-
Method Details
-
add
Adds an RDN to the sequence.- Parameters:
rdn
- RDN to add.
-
iterator
-
backward
- Returns:
- Iterable that moves backward over the RDN sequence.
-
getValues
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.- Parameters:
type
- Attribute type.- Returns:
- Non-null list of attributes of given type. An empty list is returned if there are no attributes of the given type.
-
getValue
Gets the first value of the given type that appears in the attribute list of any RDN in the sequence.- Parameters:
type
- Attribute type.- Returns:
- Value of first attribute of given type or null if no attributes of given type exist.
-
toString
Creates a comma-separated list of TYPE=VALUE tokens from the attributes in the list in order.
-