Package com.oss.asn1

Class Choice

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
EmbeddedPDV.Identification, External.Encoding, RelaySafeChoice

public abstract class Choice extends AbstractData
The Choice class represents the ASN.1 CHOICE type.
Since:
ASN.1/Java 6.0
See Also:
  • 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

      public AbstractData getChosenValue()
      Get the value of the chosen component of the CHOICE.
      Returns:
      AbstractData object that is the chosen component.
    • equalTo

      public final boolean equalTo(Choice that)
      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

      public Object 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 class AbstractData
    • getTypeName

      public String getTypeName()
      Returns the name of ASN.1 type this java class represents.
      Overrides:
      getTypeName in class AbstractData
      Returns:
      the name of the ASN.1 type.
    • hashCode

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