Package com.oss.asn1

Class Enumerated

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
RelaySafeEnumerated

public abstract class Enumerated extends AbstractData
The Enumerated class represents the ASN.1 ENUMERATED type.
Since:
ASN.1/Java 1.0-beta A
See Also:
  • Method Details

    • longValue

      public final long longValue()
      Get the value of 'this' object.
      Returns:
      long value of 'this' object.
    • indexOf

      public int indexOf()
    • equalTo

      public final boolean equalTo(Enumerated that)
      Compare 'this' object to 'that' Enumerated object to see if their contents are the same. Both objects must be ASN.1 assignment compatible or an exception occurs.
      Parameters:
      that - the Enumerated object to compare 'this' object to.
      Returns:
      true if contents of both objects are the same.
      Throws:
      ClassCastException - if 'that' is non-null and is not assignment compatible with this class.
    • compareTo

      public final int compareTo(Enumerated that)
      Compare 'this' object to 'that' Enumerated object to determine whether the contents of 'this' object is less than, equal to, or greater than the contents of 'that' object. Both objects must be ASN.1 assignment compatible or an exception occurs.
      Parameters:
      that - Enumerated object that is compared with 'this' object
      Returns:
      LESS_THAN, EQUALS, GREATER_THAN values as the results of comparison.
      Throws:
      ClassCastException - if 'that' is non-null and is not assignment compatible with this class.
    • clone

      public Object clone()
      Clone 'this' object. Enumerated clone simply returns 'this' object, no additional instances get created.
      Overrides:
      clone in class AbstractData
      Returns:
      'this'.
    • isUnknownEnumerator

      public boolean isUnknownEnumerator()
      Checks if the object is the result of decoding an unknown enumerated value of extensible enumerated type. The method must be overridden by subclasses which represent extensible enumerated types. This method simply returns 'false' for non-extensible types.
      Returns:
      false
    • hashCode

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

      public String name()
      Returns the name of this enumerator. Returns the name of the enumerator or null if the instance represents unknown enumerator.
      Returns:
      the name of this enumerator.
      Since:
      ASN.1/Java 6.1