Package org.cryptacular.x509.dn
Class Attributes
java.lang.Object
org.cryptacular.x509.dn.Attributes
Ordered list of
Attributes.- Author:
- Middleware Services
-
Constructor Summary
ConstructorsConstructorDescriptionAttributes(List<Attribute> attributes) Creates a new attributes.Attributes(Attribute... attributes) Creates a new attributes. -
Method Summary
Modifier and TypeMethodDescriptiongetAll()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()intsize()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, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Attributes
Creates a new attributes.- Parameters:
attributes- to include
-
Attributes
Creates a new attributes.- Parameters:
attributes- to include
-
-
Method Details
-
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
-