pasn
Class ASN1UnformedOrderedObject<T>

java.lang.Object
  extended by pasn.ASN1Object
      extended by pasn.ASN1UnformedOrderedObject<T>
Type Parameters:
T -
All Implemented Interfaces:
ASN1ConstructedObject, ASN1DefaultValuedObject, ASN1EncodingSpecificObject, ASN1GenericObject, ASN1PrimitiveObject<T>, ASN1PrimitiveOrConstructedObject<T>, ASN1Resetable
Direct Known Subclasses:
ASN1BitString, ASN1OctetString

public abstract class ASN1UnformedOrderedObject<T>
extends ASN1Object
implements ASN1PrimitiveOrConstructedObject<T>

Author:
ncottin

Constructor Summary
ASN1UnformedOrderedObject(int type, boolean primitive)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getDefaultConstructedLength()
           
 T getDefaultValue()
           
 int getMaximumConstructedSize(int valueSize, int maxSize)
           
 int getMaximumLength()
           
 int getMinimumLength()
           
 T getValue()
           
 T getValueOrDefault()
           
 boolean hasValueOrDefault()
           
 boolean isPrimitive()
           
 void setDecodedValue(java.lang.Object value)
           
 void setDefaultConstructedLength(int defaultConstructedLength)
           
 void setDefaultValue(T value)
           
 void setMaximumLength(int maxLength)
           Set the maximum number of bits or octets to initialize this object with
 void setMinimumLength(int minLength)
           Set the minimum number of bits or octets to initialize this object with
 void setPrimitive(boolean primitive)
           
 void setValue(T value)
           Initialializes this ASN.1 object with an appropriate value
 
Methods inherited from class pasn.ASN1Object
getAsnClass, getSpecificEncoding, getSpecificEncoding, getType, hasSpecificEncodings, setSpecificEncoding
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pasn.ASN1PrimitiveOrConstructedObject
getConstructedValues, getDefaultValueLength, getValueLength, newInstance, setConstructedValues
 
Methods inherited from interface pasn.ASN1PrimitiveObject
validateConstraints
 
Methods inherited from interface pasn.ASN1GenericObject
getASN1Name, getAsnClass, getType, hasValue
 
Methods inherited from interface pasn.ASN1DefaultValuedObject
hasDefaultValue, isValueDefault
 
Methods inherited from interface pasn.ASN1EncodingSpecificObject
getSpecificEncoding, hasSpecificEncodings
 
Methods inherited from interface pasn.ASN1Resetable
reset
 
Methods inherited from interface pasn.ASN1GenericObject
getASN1Name, getAsnClass, getType, hasValue
 
Methods inherited from interface pasn.ASN1DefaultValuedObject
hasDefaultValue, isValueDefault
 
Methods inherited from interface pasn.ASN1EncodingSpecificObject
getSpecificEncoding, hasSpecificEncodings
 
Methods inherited from interface pasn.ASN1Resetable
reset
 

Constructor Detail

ASN1UnformedOrderedObject

public ASN1UnformedOrderedObject(int type,
                                 boolean primitive)
Method Detail

setPrimitive

public final void setPrimitive(boolean primitive)

isPrimitive

public final boolean isPrimitive()
Specified by:
isPrimitive in interface ASN1PrimitiveOrConstructedObject<T>

setMinimumLength

public final void setMinimumLength(int minLength)

Set the minimum number of bits or octets to initialize this object with

Parameters:
minLength - A positive value indicates the minimum number of bits or octets allowed. efault value is zero (0). A negative value disables this constraint

getMinimumLength

public final int getMinimumLength()

setMaximumLength

public final void setMaximumLength(int maxLength)

Set the maximum number of bits or octets to initialize this object with

Parameters:
maxLength - A positive value indicates the maximum number of bits or octets allowed. This value must be greater than minimum length to be taken into account. A strictly negative value disables this constraint

getMaximumLength

public final int getMaximumLength()

setValue

public final void setValue(T value)
                    throws ASN1ConstraintException
Description copied from interface: ASN1PrimitiveObject

Initialializes this ASN.1 object with an appropriate value

Specified by:
setValue in interface ASN1PrimitiveObject<T>
Parameters:
value - A possibly null value
Throws:
ASN1ConstraintException

getValue

public final T getValue()
Specified by:
getValue in interface ASN1PrimitiveObject<T>

setDecodedValue

public final void setDecodedValue(java.lang.Object value)
                           throws ASN1FormatException,
                                  ASN1ConstraintException
Specified by:
setDecodedValue in interface ASN1PrimitiveObject<T>
Throws:
ASN1FormatException
ASN1ConstraintException

setDefaultValue

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

getDefaultValue

public final T getDefaultValue()
Specified by:
getDefaultValue in interface ASN1PrimitiveObject<T>

getValueOrDefault

public final T getValueOrDefault()
Specified by:
getValueOrDefault in interface ASN1PrimitiveObject<T>

hasValueOrDefault

public final boolean hasValueOrDefault()
Specified by:
hasValueOrDefault in interface ASN1DefaultValuedObject

getDefaultConstructedLength

public final int getDefaultConstructedLength()
Returns:
the defaultConstructedLength

setDefaultConstructedLength

public final void setDefaultConstructedLength(int defaultConstructedLength)
Parameters:
defaultConstructedLength - the defaultConstructedLength to set

getMaximumConstructedSize

public final int getMaximumConstructedSize(int valueSize,
                                           int maxSize)

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object