Package org.globus.gsi
Class X509ExtensionSet
java.lang.Object
org.globus.gsi.X509ExtensionSet
Represents a set of X.509 extensions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(X509Extension extension) Adds a X509Extension object to this set.void
clear()
Removes all extensions from the set.Retrieves X509Extension by given oid.boolean
isEmpty()
Returns if the set is empty.oidSet()
Returns a set view of the OIDs of the extensions contained in this extension set.Removes X509Extension by given oid.int
size()
Returns the size of the set.
-
Constructor Details
-
X509ExtensionSet
public X509ExtensionSet()Creates an empty X509ExtensionSet object.
-
-
Method Details
-
add
Adds a X509Extension object to this set.- Parameters:
extension
- the extension to add- Returns:
- an extension that was removed with the same oid as the new extension. Null, if none existed before.
-
get
Retrieves X509Extension by given oid.- Parameters:
oid
- the oid of the extension to retrieve.- Returns:
- the extension with the specified oid. Can be null if there is no extension with such oid.
-
remove
Removes X509Extension by given oid.- Parameters:
oid
- the oid of the extension to remove.- Returns:
- extension that was removed. Null, if extension with the specified oid does not exist in this set.
-
size
public int size()Returns the size of the set.- Returns:
- the size of the set.
-
isEmpty
public boolean isEmpty()Returns if the set is empty.- Returns:
- true if the set if empty, false otherwise.
-
clear
public void clear()Removes all extensions from the set. -
oidSet
Returns a set view of the OIDs of the extensions contained in this extension set.- Returns:
- the set with oids.
-