|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.bitmeister.asn1.type.ASN1Type
jp.bitmeister.asn1.type.StructuredType
jp.bitmeister.asn1.type.SelectiveType
public abstract class SelectiveType
The base class for structured types defined by referencing a list of distinct ASN.1 types.
This class provides generic interfaces and common methods for classes that represents structured types which defined by referencing a list of distinct ASN.1 types. This class is the parent class of {code CHOICE}.
CHOICE
Field Summary |
---|
Fields inherited from class jp.bitmeister.asn1.type.ASN1Type |
---|
stringBuilder |
Constructor Summary | |
---|---|
SelectiveType()
Instantiates an empty SelectiveType . |
|
SelectiveType(ASN1TagClass tagClass,
int tagNumber,
ASN1Type data)
Instantiates a SelectiveType and initialize it with parameters. |
|
SelectiveType(ASN1Type data)
Instantiates a SelectiveType and initialize it with the
parameter. |
Method Summary | |
---|---|
NamedTypeSpecification |
alternative(ASN1TagClass tagClass,
int tagNumber)
Returns the element specified by the ASN.1 tag class and number. |
void |
clear()
Clears the value of this ASN.1 data. |
void |
clearSelection()
Clears the selection of this instance. |
java.lang.Object |
clone()
Creates and returns a copy of this ASN.1 data. |
ASN1Type |
get(java.lang.String elementName)
Gets the ASN.1 data from the element specified by the identifier of this instance. |
int |
hashCode()
Returns a hash code value for this ASN.1 data. |
boolean |
hasValue()
Tests if this ASN.1 data has value. |
boolean |
matches(ASN1TagClass tagClass,
int tagNumber)
Tests if the ASN.1 tag matches this ASN1 type. |
java.lang.String |
selectedIdentifier()
Returns the identifier of selected alternative. |
ASN1TagValue |
selectedTag()
Returns the ASN.1 tag of selected alternative. |
ASN1Type |
selectedValue()
Returns the ASN.1 data of selected alternative. |
void |
set(NamedTypeSpecification alternative,
ASN1Type data)
Sets the ASN.1 data to the element specified by the NamedTypeSpecification of this instance. |
void |
set(java.lang.String elementName,
ASN1Type component)
Sets the ASN.1 data to the element specified by the identifier of this instance. |
boolean |
valueEquals(java.lang.Object other)
Tests if the value of this ASN.1 data equals the value of the other ASN.1 data. |
Methods inherited from class jp.bitmeister.asn1.type.ASN1Type |
---|
accept, equals, instantiate, specification, toString, validate |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SelectiveType()
SelectiveType
.
public SelectiveType(ASN1Type data)
SelectiveType
and initialize it with the
parameter. The ASN.1 tag that assigned to the type of the data is used
for select a field.
data
- The ASN.1 data assigned to this instance.public SelectiveType(ASN1TagClass tagClass, int tagNumber, ASN1Type data)
SelectiveType
and initialize it with parameters.
tagClass
- The tag class used for select a field.tagNumber
- The tag number used for select a field.data
- The data to be assigned.Method Detail |
---|
public NamedTypeSpecification alternative(ASN1TagClass tagClass, int tagNumber)
tagClass
- ASN.1 tag class.tagNumber
- ASN.1 tag number.
public boolean matches(ASN1TagClass tagClass, int tagNumber)
ASN1Type
matches
in class ASN1Type
tagClass
- The ASN.1 tag class.tagNumber
- The ASN.1 tag number.
true
when the tag class and the tag number matches this
ASN.1 type.public void set(NamedTypeSpecification alternative, ASN1Type data)
StructuredType
NamedTypeSpecification
of this instance.
set
in class StructuredType
alternative
- Indicates the element that the data to be assigned.data
- The data to be assigned.public void set(java.lang.String elementName, ASN1Type component)
StructuredType
set
in class StructuredType
elementName
- The identifier of element.component
- The ASN.1 data to be assignedpublic ASN1Type get(java.lang.String elementName)
StructuredType
get
in class StructuredType
elementName
- The identifier of element.
public ASN1Type selectedValue()
public java.lang.String selectedIdentifier()
public ASN1TagValue selectedTag()
public void clearSelection()
public void clear()
ASN1Type
clear
in class ASN1Type
public boolean hasValue()
ASN1Type
hasValue
in class ASN1Type
true
when this ASN.1 data has value.public boolean valueEquals(java.lang.Object other)
ASN1Type
true
when they have same value even if
their types are different.
valueEquals
in class ASN1Type
other
- The ASN.1 data which to be compared.
true
when they have same value.public int hashCode()
ASN1Type
hashCode
in class ASN1Type
Object.hashCode()
public java.lang.Object clone()
ASN1Type
clone
in class ASN1Type
Object.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |