|
||||||||||
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.lang.Double>
jp.bitmeister.asn1.type.builtin.REAL
public class REAL
Represents ASN.1 'REAL' type.
An instance of this class represents a 'REAL' type data, and contains a
Double
value. Encoding mode will be used when the data is
encoded with BER or DER. Default value for encoding mode is decimal and it
can be set to binary.
Field Summary |
---|
Fields inherited from class jp.bitmeister.asn1.type.ASN1Type |
---|
stringBuilder |
Constructor Summary | |
---|---|
REAL()
Instantiates an empty REAL . |
|
REAL(boolean isBinary)
Instantiates an empty REAL and sets encoding mode. |
|
REAL(double value)
Instantiates a REAL and initialize it with the double
value. |
|
REAL(double value,
boolean isBinary)
Instantiates a REAL , initializes it with the double value
and sets encoding mode. |
|
REAL(long mantissa,
int base,
int exponent)
Instantiates a REAL and initializes it with the value specified
by the M*B^E formula. |
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. |
|
boolean |
isBinary()
Returns encoding mode for this data. |
|
void |
set(java.lang.Float value)
Sets the Float value to the instance. |
|
void |
set(long mantissa,
int base,
int exponent)
Sets the value specified by the M*B^E formula to the instance. |
|
void |
setBinaryEncoding()
Sets binary encoding mode. |
|
void |
setDecimalEncoding()
Sets decimal encoding mode. |
Methods inherited from class jp.bitmeister.asn1.type.PrimitiveType |
---|
clear, clone, cloneValue, hashCode, hasValue, set, 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 REAL()
REAL
.
public REAL(boolean isBinary)
REAL
and sets encoding mode.
isBinary
- The encoding mode. true
means this REAL data will be
encoded in binary encoding.public REAL(double value)
REAL
and initialize it with the double
value.
value
- The value assigned to the instance.public REAL(double value, boolean isBinary)
REAL
, initializes it with the double
value
and sets encoding mode.
value
- The value assigned to the instance.isBinary
- The encoding mode.public REAL(long mantissa, int base, int exponent)
REAL
and initializes it with the value specified
by the M*B^E formula.
mantissa
- Mantissa.base
- Base. It can take values 2 or 10.exponent
- Exponent.Method Detail |
---|
public void set(java.lang.Float value)
Float
value to the instance.
value
- The value assigned to the instance.public void set(long mantissa, int base, int exponent)
mantissa
- Mantissa.base
- Base. It can take values 2 or 10.exponent
- Exponent.public void setBinaryEncoding()
public void setDecimalEncoding()
public boolean isBinary()
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 |