krb5.lib
Class GlobalSeqNumber

java.lang.Object
  extended by krb5.lib.GlobalSeqNumber
All Implemented Interfaces:
java.io.Serializable, SeqNumber

public class GlobalSeqNumber
extends java.lang.Object
implements SeqNumber, java.io.Serializable

Class Description : Global sequence number. A modified version of the code obtained from the Open Group Research Institute.

Version:
1.1
Author:
Bojan Pajkovski
See Also:
Serialized Form

Constructor Summary
GlobalSeqNumber(int start)
          Class constructor
GlobalSeqNumber(java.lang.Integer start)
          Class constructor
 
Method Summary
 int current()
          Returns the current value
 int next()
          Returns the next value
 void randInit()
          Sets the random value
 int step()
          Steps to the next value and returns the new value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalSeqNumber

public GlobalSeqNumber(int start)
Class constructor

Parameters:
start - int

GlobalSeqNumber

public GlobalSeqNumber(java.lang.Integer start)
Class constructor

Parameters:
start - Integer
Method Detail

randInit

public void randInit()
Sets the random value

Specified by:
randInit in interface SeqNumber

current

public int current()
Returns the current value

Specified by:
current in interface SeqNumber
Returns:
int

next

public int next()
Returns the next value

Specified by:
next in interface SeqNumber
Returns:
int

step

public int step()
Steps to the next value and returns the new value

Specified by:
step in interface SeqNumber
Returns:
int