DeclarationOfMajority (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.asn1.isismtt.x509

## Class DeclarationOfMajority

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.isismtt.x509.DeclarationOfMajority

- All Implemented Interfaces:
    ASN1Choice, ASN1Encodable, Encodable

      public class DeclarationOfMajority
      extends ASN1Object
      implements ASN1Choice

  A declaration of majority.

                 DeclarationOfMajoritySyntax ::= CHOICE
                 {
                   notYoungerThan [0] IMPLICIT INTEGER,
                   fullAgeAtCountry [1] IMPLICIT SEQUENCE
                   {
                     fullAge BOOLEAN DEFAULT TRUE,
                     country PrintableString (SIZE(2))
                   }
                   dateOfBirth [2] IMPLICIT GeneralizedTime
                 }

  fullAgeAtCountry indicates the majority of the owner with respect to the laws of a specific country.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `dateOfBirth`
    `static int` | `fullAgeAtCountry`
    `static int` | `notYoungerThan`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeclarationOfMajority(ASN1GeneralizedTime dateOfBirth)`
    `DeclarationOfMajority(boolean fullAge, java.lang.String country)`
    `DeclarationOfMajority(int notYoungerThan)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ASN1Sequence` | `fullAgeAtCountry()`
    `ASN1GeneralizedTime` | `getDateOfBirth()`
    `static DeclarationOfMajority` | `getInstance(java.lang.Object obj)`
    `int` | `getType()`
    `int` | `notYoungerThan()`
    `ASN1Primitive` | `toASN1Primitive()` Produce an object suitable for an ASN1OutputStream.

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### notYoungerThan

          public static final int notYoungerThan

      See Also:
        Constant Field Values

    - #### fullAgeAtCountry

          public static final int fullAgeAtCountry

      See Also:
        Constant Field Values

    - #### dateOfBirth

          public static final int dateOfBirth

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DeclarationOfMajority

          public DeclarationOfMajority(int notYoungerThan)

    - #### DeclarationOfMajority

          public DeclarationOfMajority(boolean fullAge,
                               java.lang.String country)

    - #### DeclarationOfMajority

          public DeclarationOfMajority(ASN1GeneralizedTime dateOfBirth)

  - ### Method Detail

    - #### getInstance

          public static DeclarationOfMajority getInstance(java.lang.Object obj)

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

      Produce an object suitable for an ASN1OutputStream.

      Returns:

                     DeclarationOfMajoritySyntax ::= CHOICE
                     {
                       notYoungerThan [0] IMPLICIT INTEGER,
                       fullAgeAtCountry [1] IMPLICIT SEQUENCE
                       {
                         fullAge BOOLEAN DEFAULT TRUE,
                         country PrintableString (SIZE(2))
                       }
                       dateOfBirth [2] IMPLICIT GeneralizedTime
                     }

      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a DERObject

    - #### getType

          public int getType()

    - #### notYoungerThan

          public int notYoungerThan()

      Returns:
        notYoungerThan if that's what we are, -1 otherwise

    - #### fullAgeAtCountry

          public ASN1Sequence fullAgeAtCountry()

    - #### getDateOfBirth

          public ASN1GeneralizedTime getDateOfBirth()