public class NumberSeries extends Object implements Serializable
NumberSeriesManager.getUniqueNumber(String, int) or
SerialNumberGenerator.getUniqueNumber(String).
Generally unique numbers should be obtained via NumberSeriesManager.| Modifier and Type | Field and Description |
|---|---|
static Logger |
LOG |
static int |
TYPE_ALPHANUMERIC |
static int |
TYPE_NUMERIC |
| Constructor and Description |
|---|
NumberSeries(String key,
long value,
int type)
Deprecated.
since 5.0 - please use
NumberSeries(String, long, int, String) |
NumberSeries(String key,
long value,
int type,
String template)
Creates a new number series value with the given key, value and type.
|
NumberSeries(String key,
String formattedValue,
int type)
Deprecated.
since 5.0 - please use
NumberSeries(String, String, int, String) |
NumberSeries(String key,
String formattedValue,
int type,
String template)
Creates a new number series value with the given key, formatted value and type.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
applyPatternIfExists(String formattedNumber) |
long |
getCurrentNumber()
Returns the long representation this value.
|
String |
getCurrentValue()
Deprecated.
use
getFormatted(int) instead |
String |
getFormatted(int digits)
Returns a formatted version of this value.
|
String |
getKey()
The sequence key.
|
String |
getTemplate()
The sequence template.
|
int |
getType()
The sequence type.
|
protected String |
replaceSpecialCharacters(String template,
String formattedNumber) |
void |
setCurrentValue(String value)
Deprecated.
has no function
|
void |
setKey(String key)
Deprecated.
has no function
|
void |
setTemplate(String template)
Deprecated.
has no function
|
void |
setType(int type)
Deprecated.
has no function
|
public static Logger LOG
public static final int TYPE_ALPHANUMERIC
public static final int TYPE_NUMERIC
@Deprecated public NumberSeries(String key, String formattedValue, int type)
NumberSeries(String, String, int, String)key - the number series keyformattedValue - a formatted valuetype - the sequence type see NumberGenerator.NumberSeriesConstants.TYPESNumberFormatException - if the formatted value could not be parsed while calculating its long representationpublic NumberSeries(String key, String formattedValue, int type, String template)
key - the number series keyformattedValue - a formatted valuetype - the sequence type see NumberGenerator.NumberSeriesConstants.TYPEStemplate - the template to be applied on generated numberNumberFormatException - if the formatted value could not be parsed while calculating its long representation@Deprecated public NumberSeries(String key, long value, int type)
NumberSeries(String, long, int, String)key - the key of the number series valuevalue - the long valuetype - the series typepublic NumberSeries(String key, long value, int type, String template)
key - the key of the number series valuevalue - the long valuetype - the series typetemplate - the template to be used with generated numberpublic long getCurrentNumber()
@Deprecated public String getCurrentValue()
getFormatted(int) insteadpublic String getFormatted(int digits)
digits - the number of digits to fill; if < 0 no leading zeros are prependedprotected String replaceSpecialCharacters(String template, String formattedNumber)
public String getTemplate()
public String getKey()
public int getType()
TYPE_ALPHANUMERIC or TYPE_NUMERIC - otherwise
getFormatted(int) will always return numeric values.@Deprecated public void setTemplate(String template)
@Deprecated public void setCurrentValue(String value)
@Deprecated public void setKey(String key)
@Deprecated public void setType(int type)
Copyright © 2017 SAP SE. All Rights Reserved.