XCMS Toolkit

schemajic.model
Class ASN1Integer

java.lang.Object
  extended by schemajic.model.ASN1Value
      extended by schemajic.model.ASN1Integer
Direct Known Subclasses:
CMSVersion, NumberOfBits

public class ASN1Integer
extends ASN1Value

Models the abstract concept of the value of ASN.1 type INTEGER.

Type INTEGER is a simple builtin type whose distinguished values consist of the countably infinite set of all positive natural numbers (1, 2, 3, ... ), the negatives of these values (-1, -2, -3, ... ) and the number zero.

In practice, applications and protocols often choose to constrain the range of allowable values to some reasonable subset. Doing so can enhance the probability of inter working, limit the costs of product implementation, and limit the greatest size of encoded values.

Universal class tag assignment is UNIVERSAL 2.

XML ASN.1 type name is INTEGER.

Version:
1.00 - 2006/02/09
Author:
support@phillipgriffin.com

Field Summary
protected  int _value
           
 
Constructor Summary
ASN1Integer()
          Constructor for ASN1Integer.
ASN1Integer(int value)
          Constructor for ASN1Integer with initialization value parameter.
 
Method Summary
 java.lang.Object accept(ValueVisitor visitor, java.lang.Object object)
          Accepts a visit from the ValueVisitor
 boolean equals(java.lang.Object o)
          Returns boolean true if the value of the provided object is equal to the current value.
 Type getAsn1Type()
          Returns an ASN.1 INTEGER type.
 int getIntValue()
          Returns the current integer value.
 void setIntValue(int value)
          Sets the current value to the provided integer value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_value

protected int _value
Constructor Detail

ASN1Integer

public ASN1Integer()
Constructor for ASN1Integer.


ASN1Integer

public ASN1Integer(int value)
Constructor for ASN1Integer with initialization value parameter.

Parameters:
value -
Method Detail

getIntValue

public int getIntValue()
Returns the current integer value.


setIntValue

public void setIntValue(int value)
Sets the current value to the provided integer value.

Parameters:
value - integer to be set as the current integer value

equals

public boolean equals(java.lang.Object o)
Returns boolean true if the value of the provided object is equal to the current value. Otherwise, returns false.

Overrides:
equals in class java.lang.Object

accept

public java.lang.Object accept(ValueVisitor visitor,
                               java.lang.Object object)
                        throws VisitorException
Accepts a visit from the ValueVisitor

Specified by:
accept in class ASN1Value
Parameters:
visitor - the function applicator (mapper), which knows how to process the given object type and apply appropriate operations to the elements of this type of object
object - an object to be visited
Returns:
a visit to the provided object
Throws:
VisitorException

getAsn1Type

public Type getAsn1Type()
Returns an ASN.1 INTEGER type.

Overrides:
getAsn1Type in class ASN1Value

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.