org.bouncycastle.asn1.isismtt.x509

Class DeclarationOfMajority

Implemented Interfaces:
ASN1Choice, DEREncodable

public class DeclarationOfMajority
extends ASN1Encodable
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

static int
dateOfBirth
static int
fullAgeAtCountry
static int
notYoungerThan

Fields inherited from class org.bouncycastle.asn1.ASN1Encodable

BER, DER

Constructor Summary

DeclarationOfMajority(boolean fullAge, String country)
DeclarationOfMajority(int notYoungerThan)
DeclarationOfMajority(DERGeneralizedTime dateOfBirth)

Method Summary

ASN1Sequence
fullAgeAtCountry()
DERGeneralizedTime
getDateOfBirth()
static DeclarationOfMajority
getInstance(Object obj)
int
getType()
int
notYoungerThan()
DERObject
toASN1Object()
Produce an object suitable for an ASN1OutputStream.

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable

equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode, toASN1Object

Field Details

dateOfBirth

public static final int dateOfBirth
Field Value:
2

fullAgeAtCountry

public static final int fullAgeAtCountry
Field Value:
1

notYoungerThan

public static final int notYoungerThan
Field Value:
0

Constructor Details

DeclarationOfMajority

public DeclarationOfMajority(boolean fullAge,
                             String country)

DeclarationOfMajority

public DeclarationOfMajority(int notYoungerThan)

DeclarationOfMajority

public DeclarationOfMajority(DERGeneralizedTime dateOfBirth)

Method Details

fullAgeAtCountry

public ASN1Sequence fullAgeAtCountry()

getDateOfBirth

public DERGeneralizedTime getDateOfBirth()

getInstance

public static DeclarationOfMajority getInstance(Object obj)

getType

public int getType()

notYoungerThan

public int notYoungerThan()
Returns:
notYoungerThan if that's what we are, -1 otherwise

toASN1Object

public DERObject toASN1Object()
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
           }
 
Overrides:
toASN1Object in interface ASN1Encodable
Returns:
a DERObject