Class ASN1Enumerated

  • All Implemented Interfaces:
    io.anyline.nfc.bouncycastle.asn1.ASN1Encodable , io.anyline.nfc.bouncycastle.util.Encodable

    
    public class ASN1Enumerated
    extends ASN1Primitive
                        

    Class representing the ASN.1 ENUMERATED type.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static ASN1Enumerated getInstance(Object obj) return an enumerated from the passed in object
      static ASN1Enumerated getInstance(ASN1TaggedObject taggedObject, boolean explicit) return an Enumerated from a tagged object.
      BigInteger getValue()
      boolean hasValue(int x)
      boolean hasValue(BigInteger x)
      int intValueExact()
      int hashCode()
      • Methods inherited from class io.anyline.nfc.bouncycastle.asn1.ASN1Primitive

        encodeTo, encodeTo, equals, equals, equals, fromByteArray, toASN1Primitive
      • Methods inherited from class io.anyline.nfc.bouncycastle.asn1.ASN1Object

        equals, getEncoded, getEncoded
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ASN1Enumerated

        ASN1Enumerated(int value)
        Constructor from int.
        Parameters:
        value - the value of this enumerated.
      • ASN1Enumerated

        ASN1Enumerated(BigInteger value)
        Constructor from BigInteger
        Parameters:
        value - the value of this enumerated.
      • ASN1Enumerated

        ASN1Enumerated(Array<byte> contents)
        Constructor from encoded BigInteger.
        Parameters:
        contents - the value of this enumerated as an encoded BigInteger (signed).
    • Method Detail

      • getInstance

         static ASN1Enumerated getInstance(Object obj)

        return an enumerated from the passed in object

        Parameters:
        obj - an ASN1Enumerated or an object that can be converted into one.
        Returns:

        an ASN1Enumerated instance, or null.

      • getInstance

         static ASN1Enumerated getInstance(ASN1TaggedObject taggedObject, boolean explicit)

        return an Enumerated from a tagged object.

        Parameters:
        taggedObject - the tagged object holding the object we want
        explicit - true if the object is meant to be explicitly tagged false otherwise.
        Returns:

        an ASN1Enumerated instance, or null.