|
||||||||||
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.PrimitiveType<java.math.BigInteger>
jp.bitmeister.asn1.type.builtin.INTEGER
public class INTEGER
Represents ASN.1 'INTEGER' type.
An instance of this class represents an 'INTEGER' type data, and has a
BigInteger
value.
A sub-class of INTEGER
can contain one or more fields annotated as
@ASN1Enumeration
. If a sub-class of INTEGER
contains
@ASN1Enumeration
fields, the value of the data must be same as one of
the @ASN1Enumeration
fields.
ASN1Enumeration
Field Summary |
---|
Fields inherited from class jp.bitmeister.asn1.type.ASN1Type |
---|
stringBuilder |
Constructor Summary | |
---|---|
INTEGER()
Instantiates an empty INTEGER . |
|
INTEGER(java.math.BigInteger value)
Instantiates an INTEGER and initialize it with the
BigInteger value. |
|
INTEGER(long value)
Instantiates an INTEGER and initialize it with the long
value. |
Method Summary | ||
---|---|---|
|
accept(ASN1Visitor<R,E> visitor)
Accepts the ASN1Visitor and calls a visit method of the
visitor. |
|
int |
compareTo(ASN1Type other)
Compares the value of this instance to the value of the other instance. |
|
java.lang.String |
identifier()
Returns an identifier related to the value of this data if the type has @ASN1Enumeration fields. |
|
int |
intValue()
Returns an int value that converted from the value of this data. |
|
boolean |
isIntValue()
Tests if the value of this data is in the range of int value. |
|
boolean |
isLongValue()
Tests if the value of this data is in the range of long value. |
|
long |
longValue()
Returns a long value that converted from the value of this data. |
|
void |
set(java.math.BigInteger value)
Sets the value to this data. |
|
void |
set(long value)
Sets the long value to this data. |
|
void |
set(java.lang.String nameOfNumber)
Sets the value specified by the name of number to this data. |
Methods inherited from class jp.bitmeister.asn1.type.PrimitiveType |
---|
clear, clone, cloneValue, hashCode, hasValue, value, valueEquals |
Methods inherited from class jp.bitmeister.asn1.type.ASN1Type |
---|
equals, instantiate, matches, specification, toString, validate |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public INTEGER()
INTEGER
.
public INTEGER(java.math.BigInteger value)
INTEGER
and initialize it with the
BigInteger
value.
value
- The value to be assigned.public INTEGER(long value)
INTEGER
and initialize it with the long
value.
value
- The value to be assigned.Method Detail |
---|
public void set(java.math.BigInteger value)
PrimitiveType
set
in class PrimitiveType<java.math.BigInteger>
value
- The value to be set.public void set(long value)
long
value to this data.
value
- The value to be assigned.public void set(java.lang.String nameOfNumber)
nameOfNumber
- The name of number.public java.lang.String identifier()
@ASN1Enumeration
fields.
public boolean isLongValue()
long
value.
true
when the value of this data is in the range of
long
.public boolean isIntValue()
int
value.
true
when the value of this data is in the range of
int
.public long longValue()
long
value that converted from the value of this data.
long
value.public int intValue()
int
value that converted from the value of this data.
int
value.public int compareTo(ASN1Type other)
ValueComparable
compareTo
in interface ValueComparable
other
- The instance whose value to be compared.
public <R,E extends java.lang.Throwable> R accept(ASN1Visitor<R,E> visitor) throws E extends java.lang.Throwable
ASN1Type
ASN1Visitor
and calls a visit
method of the
visitor.
accept
in class ASN1Type
visitor
- The visitor.
E
- When an error occured in the visit
method of the
visitor.
E extends java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |