|
||||||||||
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<T>
jp.bitmeister.asn1.type.AbstractInteger<T>
public abstract class AbstractInteger<T extends java.lang.Number & java.lang.Comparable<T>>
The base class for ASN.1 'INTEGER' types.
This class provides generic interfaces and common methods for classes that represents ASN.1 'INTEGER' type.
A sub-class of AbstractInteger
can contain one or more fields
annotated as @ASN1Enumeration
. If a sub-class of
AbstractInteger
contains @ASN1Enumeration
fields, the value
of the data must be same as one of the @ASN1Enumeration
fields.
ASN1Enumeration
,
INTEGER
,
BigINTEGER
Field Summary |
---|
Fields inherited from class jp.bitmeister.asn1.type.ASN1Type |
---|
stringBuilder |
Constructor Summary | |
---|---|
AbstractInteger()
|
Method Summary | |
---|---|
int |
compareTo(AbstractInteger<T> other)
Compares the value of this instance to the value of the other instance. |
protected abstract java.util.Map<T,java.lang.String> |
getNamedNumberMap()
Returns map of enumerations related to this type. |
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. |
protected abstract boolean |
isEnum()
Tests if base type of this data is ASN.1 'ENUMERATED'. |
abstract boolean |
isIntValue()
Tests if the value of this data is in the range of int value. |
abstract 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.lang.String nameOfNumber)
Sets the value specified by the name of number to this data. |
void |
set(T value)
Sets the value 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 |
---|
accept, equals, instantiate, matches, specification, toString, validate |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractInteger()
Method Detail |
---|
public void set(java.lang.String nameOfNumber)
nameOfNumber
- The name of number.public void set(T value)
PrimitiveType
set
in class PrimitiveType<T extends java.lang.Number & java.lang.Comparable<T>>
value
- The value to be set.public java.lang.String identifier()
@ASN1Enumeration
fields.
public abstract boolean isLongValue()
long
value.
true
when the value of this data is in the range of
long
.public abstract 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(AbstractInteger<T> other)
ValueComparable
compareTo
in interface ValueComparable<AbstractInteger<T extends java.lang.Number & java.lang.Comparable<T>>>
other
- The instance whose value to be compared.
protected abstract java.util.Map<T,java.lang.String> getNamedNumberMap()
protected abstract boolean isEnum()
true
if base type of this data is ASN.1 'ENUMERATED'.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |