Package org.cryptacular.x509.dn
Class Attributes
java.lang.Object
org.cryptacular.x509.dn.Attributes
Ordered list of
Attribute
s.- Author:
- Middleware Services
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an attribute by type and value to the end of the attribute list.void
Adds the given attribute to the end of the attribute list.getAll()
Gets an immutable list of attributes.getValue
(AttributeType type) Gets the first value of the given type that appears in the attribute list.getValues
(AttributeType type) Gets an immutable list of all attributes of the given type.iterator()
int
size()
Gets the number of attributes contained in this instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Attributes
public Attributes()
-
-
Method Details
-
add
Adds an attribute by type and value to the end of the attribute list.- Parameters:
typeOid
- OID of attribute type.value
- Attribute value.
-
add
Adds the given attribute to the end of the attribute list.- Parameters:
attr
- Non-null attribute.
-
size
public int size()Gets the number of attributes contained in this instance.- Returns:
- Number of attributes.
-
getAll
Gets an immutable list of attributes.- Returns:
- Non-null immutable attribute list.
-
getValues
Gets an immutable list of all attributes of the given type. The order of the returned list reflects the ordering of the underlying 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.- Parameters:
type
- Attribute type.- Returns:
- Value of first attribute of given type or null if no attributes of given type exist.
-
iterator
-