Package com.oss.asn1

Class InfoObjectSet<T extends InfoObject>

java.lang.Object
com.oss.asn1.InfoObjectSet<T>
All Implemented Interfaces:
com.oss.asn1.Sizeable, Serializable, Cloneable

public abstract class InfoObjectSet<T extends InfoObject> extends Object implements com.oss.asn1.Sizeable
The InfoObjectSet class represents a set of information objects of the appropriate information object class.
Since:
ASN.1/Java 6.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    The default constructor.
    InfoObjectSet(T[] objects, int flags)
    Construct an instance of InfoObjectSet from an array of information objects and flags.
    InfoObjectSet(T[] objects, int flags, String modname, String osetname)
    Construct an instance of InfoObjectSet from an array of information objects, flags and a name.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addObject(T element)
    Add an information object at the end of the InfoObjectSet container if it is extensible
    Create a deep copy of 'this' object.
    getObject(int atIndex)
    Returns an information object identified by its index from the original array of objects.
    int
    Return the size of the container.
    void
    insertObject(T element, int atIndex)
    Insert an information object to the container at the index if the InfoObjectSet is extensible.
    boolean
    Check whether 'this' InfoObjectSet corresponds to an extensible information object set.
    final Iterable<T>
    Get an Enumeration of the elements stored in the container.
    void
     
    void
    removeObject(T element)
    Remove the information object, which object reference matches the reference of the input object, from this information object set.
    void
    setObject(T element, int atIndex)
    Set the Element at the index in the container to the new element.
    Provides the conversion of 'this' object into the Java String object containing the ASN.1 value notation format.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • InfoObjectSet

      public InfoObjectSet()
      The default constructor.
    • InfoObjectSet

      public InfoObjectSet(T[] objects, int flags)
      Construct an instance of InfoObjectSet from an array of information objects and flags. Currently the only flag supported is EXTENSIBLE.
      Parameters:
      objects - an array of InfoObject objects.
      flags - all flags to be used "OR"ed together, 0 indicates no flags.
    • InfoObjectSet

      public InfoObjectSet(T[] objects, int flags, String modname, String osetname)
      Construct an instance of InfoObjectSet from an array of information objects, flags and a name. Currently the only flag supported is EXTENSIBLE.
      Parameters:
      objects - an array of InfoObject objects.
      flags - all flags to be used "OR"ed together, 0 indicates no flags.
      modname - the name of ASN.1 module where this information object set is defined.
      osetname - the ASN.1 name of this this information object set.
  • Method Details

    • isExtensible

      public boolean isExtensible()
      Check whether 'this' InfoObjectSet corresponds to an extensible information object set.
      Returns:
      true if the InfoObjectSet is extensible.
    • addObject

      public void addObject(T element)
      Add an information object at the end of the InfoObjectSet container if it is extensible
      Parameters:
      element - the object to add.
    • insertObject

      public void insertObject(T element, int atIndex)
      Insert an information object to the container at the index if the InfoObjectSet is extensible.
      Parameters:
      element - the object to insert.
      atIndex - the slot to insert the object into.
    • removeObject

      public void removeObject(T element)
      Remove the information object, which object reference matches the reference of the input object, from this information object set.
      Parameters:
      element - the element to remove.
    • setObject

      public void setObject(T element, int atIndex)
      Set the Element at the index in the container to the new element.
      Parameters:
      element - the new object to set.
      atIndex - the index to set the object at.
    • getObject

      public T getObject(int atIndex)
      Returns an information object identified by its index from the original array of objects.
      Parameters:
      atIndex - the index of the object to get.
      Returns:
      information object identified by index.
    • removeAllObjects

      public void removeAllObjects()
    • getSize

      public int getSize()
      Return the size of the container.
      Specified by:
      getSize in interface com.oss.asn1.Sizeable
      Returns:
      number of elements in the container.
    • objects

      public final Iterable<T> objects()
      Get an Enumeration of the elements stored in the container.
      Returns:
      Enumeration of the objects in the container.
    • clone

      public Object clone()
      Create a deep copy of 'this' object.
      Returns:
      copy of 'this' object.
    • toString

      public String toString()
      Provides the conversion of 'this' object into the Java String object containing the ASN.1 value notation format.
      Overrides:
      toString in class Object
      Returns:
      String containing the ASN.1 value notation of 'this' object.