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
The AbstractContainer class implements functionality common to
SequenceOf and SetOf classes.
- Since:
- ASN.1/Java 1.0-beta A
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone 'this' object.void
delete()
Destroy the instance of the AbstractData.final Enumeration<AbstractData>
elements()
Get an Enumeration of the elements stored in the container.final int
getSize()
Return the size of the container.int
hashCode()
Returns a hash code for this objectvoid
remove
(int index) Remove the AbstractData object identified by its index from the container.void
Remove all AbstractData object elements from the container.final int
size()
Deprecated.It was replaced by the new method getSize().Methods inherited from class com.oss.asn1.AbstractData
equals, getTypeInfo, isEncodable, isPDU, isValid, toString, toString
-
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.It was replaced by the new method getSize(). -
getSize
public final int getSize()Return the size of the container.- Specified by:
getSize
in interfacecom.oss.asn1.Sizeable
- Returns:
- number of elements in the container.
-
elements
Get an Enumeration of the elements stored in the container.- Returns:
- Enumeration of the objects in the container.
-
clone
Clone 'this' object.- Overrides:
clone
in classAbstractData
- Returns:
- deep copy of 'this' object.
-
hashCode
public int hashCode()Returns a hash code for this object- Overrides:
hashCode
in classAbstractData
- 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 classAbstractData
-