Class X509ExtensionSet

java.lang.Object
org.globus.gsi.X509ExtensionSet

public class X509ExtensionSet extends Object
Represents a set of X.509 extensions.
  • Constructor Details

    • X509ExtensionSet

      public X509ExtensionSet()
      Creates an empty X509ExtensionSet object.
  • Method Details

    • add

      public X509Extension add(X509Extension extension)
      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

      public X509Extension get(String oid)
      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

      public X509Extension remove(String oid)
      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

      public Set oidSet()
      Returns a set view of the OIDs of the extensions contained in this extension set.
      Returns:
      the set with oids.