Package com.oss.asn1
Class Choice
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.Choice
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
EmbeddedPDV.Identification
,External.Encoding
,RelaySafeChoice
The Choice class represents the ASN.1 CHOICE type.
- Since:
- ASN.1/Java 6.0
- 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 boolean
Compare 'this' object to another Choice object to see if their contents are the same.final int
Get an integer value indicating which component of the CHOICE is chosen.Get the value of the chosen component of the CHOICE.Returns the name of ASN.1 type this java class represents.int
hashCode()
Returns a hash code for this objectboolean
Checks if the object is the result of decoding an unknown extension of extensible CHOICE type.Methods inherited from class com.oss.asn1.AbstractData
equals, isEncodable, isPDU, isValid, toString, toString
-
Method Details
-
getChosenFlag
public final int getChosenFlag()Get an integer value indicating which component of the CHOICE is chosen.- Returns:
- integer value that indicates the chosen component.
-
getChosenValue
Get the value of the chosen component of the CHOICE.- Returns:
- AbstractData object that is the chosen component.
-
equalTo
Compare 'this' object to another Choice object to see if their contents are the same.- Parameters:
that
- the Choice object to compare 'this' object to.- Returns:
- true if contents of both objects are the same.
-
clone
Clone 'this' object.- Returns:
- deep copy of 'this' object.
-
hasUnknownExtension
public boolean hasUnknownExtension()Checks if the object is the result of decoding an unknown extension of extensible CHOICE type. The method must be overridden by subclasses which represent extensible CHOICE types. This method simply returns 'false' for non-extensible types.- Returns:
- false
-
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
-
getTypeName
Returns the name of ASN.1 type this java class represents.- Overrides:
getTypeName
in classAbstractData
- Returns:
- the name of the ASN.1 type.
-
hashCode
public int hashCode()Returns a hash code for this object- Overrides:
hashCode
in classAbstractData
- Returns:
- a hash code for this object
-