IAIK PKCS#11 Wrapper
version 1.2.16

iaik.pkcs.pkcs11
Class Version

java.lang.Object
  extended byiaik.pkcs.pkcs11.Version
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
VersionParameters

public class Version
extends Object
implements Cloneable

Objects of this class represent a version. This consists of a major and a minor version number.

Invariants

Field Summary
protected  byte major_
          The major version number.
protected  byte minor_
          The minor version number.
 
Constructor Summary
protected Version()
          Constructor for internal use only.
protected Version(CK_VERSION ckVersion)
          Constructor taking a CK_VERSION object.
 
Method Summary
 Object clone()
          Create a (deep) clone of this object.
 boolean equals(Object otherObject)
          Compares major and minor version number of this objects with the other object.
 byte getMajor()
          Get the major version number.
 byte getMinor()
          Get the minor version number.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

major_

protected byte major_
The major version number.


minor_

protected byte minor_
The minor version number.

Constructor Detail

Version

protected Version()
Constructor for internal use only.

Preconditions
Postconditions

Version

protected Version(CK_VERSION ckVersion)
Constructor taking a CK_VERSION object.

Parameters:
ckVersion - A CK_VERSION object.
Preconditions
(ckVersion <> null)
Postconditions
Method Detail

clone

public Object clone()
Create a (deep) clone of this object.

Returns:
A clone of this object.
Preconditions
Postconditions
(result <> null) and (result instanceof Version) and (result.equals(this))

getMajor

public byte getMajor()
Get the major version number.

Returns:
The major version number.
Preconditions
Postconditions

getMinor

public byte getMinor()
Get the minor version number.

Returns:
The minor version number.
Preconditions
Postconditions

toString

public String toString()
Returns the string representation of this object.

Returns:
the string representation of this object

equals

public boolean equals(Object otherObject)
Compares major and minor version number of this objects with the other object. Returns only true, if both are equal in both objects.

Parameters:
otherObject - The other Version object.
Returns:
True, if other is an instance of Info and all member variables of both objects are equal. False, otherwise.
Preconditions
Postconditions

hashCode

public int hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a hashtable.

Returns:
The hash code of this object. Gained from the slotID_, state_ and deviceError_.
Preconditions
Postconditions

IAIK PKCS#11 Wrapper
version 1.2.16

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/

IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2002, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.