jp.bitmeister.asn1.type.builtin
Class BigINTEGER

java.lang.Object
  extended by jp.bitmeister.asn1.type.ASN1Type
      extended by jp.bitmeister.asn1.type.PrimitiveType<T>
          extended by jp.bitmeister.asn1.type.AbstractInteger<java.math.BigInteger>
              extended by jp.bitmeister.asn1.type.builtin.BigINTEGER
All Implemented Interfaces:
java.lang.Cloneable, ValueComparable<AbstractInteger<java.math.BigInteger>>
Direct Known Subclasses:
BigENUMERATED

public class BigINTEGER
extends AbstractInteger<java.math.BigInteger>

An implementation of ASN.1 'INTEGER' type that can contain arbitrary-precision integer value.

An instance of this class represents an 'INTEGER' type data that needs to contain an arbitrary-precision value. It has a BigInteger value.

Author:
WATANABE, Jun.
See Also:
INTEGER

Field Summary
 
Fields inherited from class jp.bitmeister.asn1.type.ASN1Type
stringBuilder
 
Constructor Summary
BigINTEGER()
          Instantiates an empty INTEGER.
BigINTEGER(java.math.BigInteger value)
          Instantiates an INTEGER and initialize it with the BigInteger value.
BigINTEGER(long value)
          Instantiates an INTEGER and initialize it with the long value.
 
Method Summary
<R,E extends java.lang.Throwable>
R
accept(ASN1Visitor<R,E> visitor)
          Accepts the ASN1Visitor and calls a visit method of the visitor.
 java.util.Map<java.math.BigInteger,java.lang.String> getNamedNumberMap()
          Returns map of enumerations related to this type.
protected  boolean isEnum()
          Tests if base type of this data is ASN.1 'ENUMERATED'.
 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.
 void set(long value)
          Sets the long value to this data.
 
Methods inherited from class jp.bitmeister.asn1.type.AbstractInteger
compareTo, identifier, intValue, longValue, set, set
 
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

BigINTEGER

public BigINTEGER()
Instantiates an empty INTEGER.


BigINTEGER

public BigINTEGER(java.math.BigInteger value)
Instantiates an INTEGER and initialize it with the BigInteger value.

Parameters:
value - The value to be assigned.

BigINTEGER

public BigINTEGER(long value)
Instantiates an INTEGER and initialize it with the long value.

Parameters:
value - The value to be assigned.
Method Detail

set

public void set(long value)
Sets the long value to this data.

Parameters:
value - The value to be assigned.

isLongValue

public boolean isLongValue()
Tests if the value of this data is in the range of long value.

Specified by:
isLongValue in class AbstractInteger<java.math.BigInteger>
Returns:
true when the value of this data is in the range of long.

isIntValue

public boolean isIntValue()
Tests if the value of this data is in the range of int value.

Specified by:
isIntValue in class AbstractInteger<java.math.BigInteger>
Returns:
true when the value of this data is in the range of int.

getNamedNumberMap

public java.util.Map<java.math.BigInteger,java.lang.String> getNamedNumberMap()
Description copied from class: AbstractInteger
Returns map of enumerations related to this type.

Specified by:
getNamedNumberMap in class AbstractInteger<java.math.BigInteger>
Returns:
The map of enumerations.

accept

public <R,E extends java.lang.Throwable> R accept(ASN1Visitor<R,E> visitor)
         throws E extends java.lang.Throwable
Description copied from class: ASN1Type
Accepts the ASN1Visitor and calls a visit method of the visitor.

Specified by:
accept in class ASN1Type
Parameters:
visitor - The visitor.
Returns:
Result.
Throws:
E - When an error occurred in the visit method of the visitor.
E extends java.lang.Throwable

isEnum

protected boolean isEnum()
Description copied from class: AbstractInteger
Tests if base type of this data is ASN.1 'ENUMERATED'.

Specified by:
isEnum in class AbstractInteger<java.math.BigInteger>
Returns:
true if base type of this data is ASN.1 'ENUMERATED'.


Copyright © 2012 BitMeister Inc. All Rights Reserved.