public class KeyWithPadding extends Object
Modifier and Type | Field and Description |
---|---|
long |
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-
|
String |
suffix
The suffix of the key, such as -a in "REQ-001-a".
|
Constructor and Description |
---|
KeyWithPadding(String prefix,
long number,
int padding,
String suffix) |
Modifier and Type | Method and Description |
---|---|
String |
asString() |
static List<String> |
generate(String prefix,
long start,
int padding,
int count)
Generate 'count' keys with the specified parameters
|
long |
getNumber() |
int |
getPadding() |
String |
getPrefix() |
String |
getSuffix() |
KeyWithPadding |
next() |
static KeyWithPadding |
parseKey(String key)
Parses a key and returns the padding
|
String |
toString() |
public final long number
public final int padding
public KeyWithPadding next()
public String asString()
public static KeyWithPadding parseKey(@Nonnull String key)
public long getNumber()
public int getPadding()
public static List<String> generate(String prefix, long start, int padding, int count)
Copyright © 2022 Requirement Yogi. All rights reserved.