pasn
Class ASN1Integer

java.lang.Object
  extended by pasn.ASN1Object
      extended by pasn.ASN1SimpleObject<java.math.BigInteger>
          extended by pasn.ASN1Integer
All Implemented Interfaces:
ASN1DefaultValuedObject, ASN1EncodingSpecificObject, ASN1GenericObject, ASN1PrimitiveObject<java.math.BigInteger>, ASN1Resetable

public class ASN1Integer
extends ASN1SimpleObject<java.math.BigInteger>

An ASN.1 INTEGER holds a finite, signed, integer, in a length-independant manner. This INTEGER may be constrained with a minimum and a maximum values. These values correspond to the (minValue .. maxValue) ASN.1 definitions

Author:
ncottin

Constructor Summary
ASN1Integer()
           
 
Method Summary
 java.lang.String getASN1Name()
           
 java.math.BigInteger getMaximumValue()
           
 java.math.BigInteger getMinimumValue()
           
 boolean hasDefaultValue()
           
 boolean hasValue()
           
 boolean isValueDefault()
           
 void reset()
           Removes the value (or list or set of values) of this ASN.1 object.
 void setDecodedValue(java.lang.Object value)
           
 void setDefaultValue(long value)
           
 void setMaximumValue(java.math.BigInteger maxValue)
           
 void setMaximumValue(long maxValue)
           
 void setMinimumValue(java.math.BigInteger minValue)
           
 void setMinimumValue(long minValue)
           
 void setValue(long value)
           
 java.lang.String toString()
           
 void validateConstraints(java.math.BigInteger value)
           
 
Methods inherited from class pasn.ASN1SimpleObject
equals, getDefaultValue, getValue, getValueOrDefault, hasValueOrDefault, setDefaultValue, setValue
 
Methods inherited from class pasn.ASN1Object
getAsnClass, getSpecificEncoding, getSpecificEncoding, getType, hasSpecificEncodings, setSpecificEncoding
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface pasn.ASN1GenericObject
getAsnClass, getType
 
Methods inherited from interface pasn.ASN1EncodingSpecificObject
getSpecificEncoding, hasSpecificEncodings
 

Constructor Detail

ASN1Integer

public ASN1Integer()
Method Detail

getASN1Name

public final java.lang.String getASN1Name()

setValue

public final void setValue(long value)
                    throws ASN1ConstraintException
Throws:
ASN1ConstraintException

setDefaultValue

public final void setDefaultValue(long value)
                           throws ASN1ConstraintException
Throws:
ASN1ConstraintException

isValueDefault

public final boolean isValueDefault()

reset

public final void reset()
Description copied from interface: ASN1Resetable

Removes the value (or list or set of values) of this ASN.1 object. This applies to simple and structured ASN.1 objects


hasValue

public final boolean hasValue()

hasDefaultValue

public final boolean hasDefaultValue()

setDecodedValue

public final void setDecodedValue(java.lang.Object value)
                           throws ASN1FormatException,
                                  ASN1ConstraintException
Throws:
ASN1FormatException
ASN1ConstraintException

getMaximumValue

public final java.math.BigInteger getMaximumValue()
Returns:
the maxValue

setMaximumValue

public final void setMaximumValue(java.math.BigInteger maxValue)
Parameters:
maxValue - the maxValue to set

setMaximumValue

public final void setMaximumValue(long maxValue)

getMinimumValue

public final java.math.BigInteger getMinimumValue()
Returns:
the minValue

setMinimumValue

public final void setMinimumValue(java.math.BigInteger minValue)
Parameters:
minValue - the minValue to set

setMinimumValue

public final void setMinimumValue(long minValue)

validateConstraints

public final void validateConstraints(java.math.BigInteger value)
                               throws ASN1ConstraintException
Throws:
ASN1ConstraintException

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object