| java.lang.Object org.griphyn.vdl.util.SequenceGenerator
SequenceGenerator | public class SequenceGenerator (Code) | | Each instance of this class produces a row of sequence numbers.
By default, the sequence string has six digits.
author: Jens-S. Vöckler author: Yong Zhao version: $Revision: 50 $ |
Constructor Summary | |
public | SequenceGenerator() C'tor: This will generate an six digit sequence strings. | public | SequenceGenerator(int digits) C'tor: Instances from this contructor will generate ${prefix}xxxxx.
Please note that multiple instances of this class with the same
prefix will produce the same sequences!
Parameters: digits - are the number of digits to use. |
Method Summary | |
public String | generate() Creates the next sequence number as textual string.
the next sequence number string. exception: RuntimeException - , if the maximum permissable value was reached. |
SequenceGenerator | public SequenceGenerator()(Code) | | C'tor: This will generate an six digit sequence strings.
|
SequenceGenerator | public SequenceGenerator(int digits)(Code) | | C'tor: Instances from this contructor will generate ${prefix}xxxxx.
Please note that multiple instances of this class with the same
prefix will produce the same sequences!
Parameters: digits - are the number of digits to use. This value must be atleast one. exception: IllegalArgumentException - if the number of digits is negative |
generate | public String generate() throws RuntimeException(Code) | | Creates the next sequence number as textual string.
the next sequence number string. exception: RuntimeException - , if the maximum permissable value was reached. |
|
|