Package com.oss.asn1
Class HugeInteger
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.HugeInteger
- All Implemented Interfaces:
com.oss.asn1.Comparable
,Serializable
,Cloneable
The HugeInteger class represents the ASN.1 HugeInteger type.
- Since:
- ASN.1/Java 1.0-beta A
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.HugeInteger
(BigInteger value) Construct from java.math.BigInteger value. -
Method Summary
Modifier and TypeMethodDescriptionfinal BigInteger
Get the value of 'this' object as a java.math.BigInteger.clone()
Clone 'this' object.final int
compareTo
(HugeInteger that) Compare 'this' object to another HugeInteger object to determine whether the contents of 'this' object is less than, equal to, or greater than the contents of another object.void
delete()
Destroy the instance of the AbstractData.final boolean
equalTo
(HugeInteger that) Compare 'this' object to another HugeInteger object to see if their contents are the same.int
hashCode()
Returns a hash code for this objectfinal void
setValue
(BigInteger value) Set the value of 'this' object to a java.math.BigInteger.Methods inherited from class com.oss.asn1.AbstractData
equals, isEncodable, isPDU, isValid, toString, toString
-
Constructor Details
-
HugeInteger
public HugeInteger()The default constructor. -
HugeInteger
Construct from java.math.BigInteger value.- Parameters:
value
- the java.math.BigInteger to set 'this' object to.
-
-
Method Details
-
setValue
Set the value of 'this' object to a java.math.BigInteger.- Parameters:
value
- the java.math.BigInteger to set 'this' object to.
-
bigIntegerValue
Get the value of 'this' object as a java.math.BigInteger.- Returns:
- java.math.BigInteger value of this object.
-
equalTo
Compare 'this' object to another HugeInteger object to see if their contents are the same.- Parameters:
that
- the HugeInteger object to compare 'this' object to.- Returns:
- true if contents of both objects are the same.
-
compareTo
Compare 'this' object to another HugeInteger object to determine whether the contents of 'this' object is less than, equal to, or greater than the contents of another object.- Parameters:
that
- HugeInteger object that is compared with 'this' object- Returns:
- LESS_THAN, EQUALS, GREATER_THAN values as the results of comparison.
-
clone
Clone 'this' object.- Overrides:
clone
in classAbstractData
- Returns:
- deep copy of 'this' object.
-
delete
public void delete()Destroy the instance of the AbstractData. The contract of this method is to facilitate garbage collection by explicit destruction of the data that is no longer needed.- Overrides:
delete
in classAbstractData
-
hashCode
public int hashCode()Returns a hash code for this object- Overrides:
hashCode
in classAbstractData
- Returns:
- a hash code for this object
-