public class KeyWithPadding extends Object
Modifier and Type | Field and Description |
---|---|
int |
number
The number of the key, such as 1 in REQ-001
|
int |
padding
The minimum number of characters in the number, such as 3 in REQ-001
|
String |
prefix
The prefix of the key, such as REQ-
|
Constructor and Description |
---|
KeyWithPadding(String prefix,
int number,
int padding) |
Modifier and Type | Method and Description |
---|---|
String |
asString() |
static List<String> |
generate(String prefix,
int start,
int padding,
int count)
Generate 'count' keys with the specified parameters
|
KeyWithPadding |
next() |
static KeyWithPadding |
parseKey(String key)
Parses a key and returns the padding
|
String |
toString() |
public final String prefix
public final int number
public final int padding
public KeyWithPadding(String prefix, int number, int padding)
public KeyWithPadding next()
public String asString()
public static KeyWithPadding parseKey(String key)
public static List<String> generate(String prefix, int start, int padding, int count)
Copyright © 2021 Play SQL. All rights reserved.