Package com.oss.asn1

Class AbstractContainer

java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractContainer
All Implemented Interfaces:
com.oss.asn1.Sizeable, Serializable, Cloneable
Direct Known Subclasses:
SequenceOf, SetOf

public abstract class AbstractContainer extends AbstractData implements com.oss.asn1.Sizeable
The AbstractContainer class implements functionality common to SequenceOf and SetOf classes.
Since:
ASN.1/Java 1.0-beta A
See Also:
  • Method Details

    • remove

      public void remove(int index)
      Remove the AbstractData object identified by its index from the container.
      Parameters:
      index - the index of the object to remove.
    • removeAllElements

      public void removeAllElements()
      Remove all AbstractData object elements from the container. Container becomes empty.
    • size

      @Deprecated public final int size()
      Deprecated.
      It was replaced by the new method getSize().
      Returns:
      number of elements in the container.
    • getSize

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

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

      public Object clone()
      Clone 'this' object.
      Overrides:
      clone in class AbstractData
      Returns:
      deep copy of 'this' object.
    • hashCode

      public int hashCode()
      Returns a hash code for this object
      Overrides:
      hashCode in class AbstractData
      Returns:
      a hash code for this object
    • delete

      public void delete()
      Destroy the instance of the AbstractData. The contract of this method is to facilitate garbage collection by explicit destruction of the data that is no longer needed.
      Overrides:
      delete in class AbstractData