public class NumberSeries
extends java.lang.Object
implements java.io.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(java.lang.String key,
long value,
int type)
Deprecated.
since 5.0 - please use
NumberSeries(String, long, int, String) |
NumberSeries(java.lang.String key,
long value,
int type,
java.lang.String template)
Creates a new number series value with the given key, value and type.
|
NumberSeries(java.lang.String key,
java.lang.String formattedValue,
int type)
Deprecated.
since 5.0 - please use
NumberSeries(String, String, int, String) |
NumberSeries(java.lang.String key,
java.lang.String formattedValue,
int type,
java.lang.String template)
Creates a new number series value with the given key, formatted value and type.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
applyPatternIfExists(java.lang.String formattedNumber) |
long |
getCurrentNumber()
Returns the long representation this value.
|
java.lang.String |
getCurrentValue()
Deprecated.
since ages - use
getFormatted(int) instead |
java.lang.String |
getFormatted(int digits)
Returns a formatted version of this value.
|
java.lang.String |
getKey()
The sequence key.
|
java.lang.String |
getTemplate()
The sequence template.
|
int |
getType()
The sequence type.
|
protected java.lang.String |
replaceSpecialCharacters(java.lang.String template,
java.lang.String formattedNumber) |
void |
setCurrentValue(java.lang.String value)
Deprecated.
since ages - has no function
|
void |
setKey(java.lang.String key)
Deprecated.
since ages - has no function
|
void |
setTemplate(java.lang.String template)
Deprecated.
since ages - has no function
|
void |
setType(int type)
Deprecated.
since ages - has no function
|
public static Logger LOG
public static final int TYPE_ALPHANUMERIC
public static final int TYPE_NUMERIC
@Deprecated
public NumberSeries(java.lang.String key,
java.lang.String formattedValue,
int type)
NumberSeries(String, String, int, String)key - the number series keyformattedValue - a formatted valuetype - the sequence type see NumberGenerator.NumberSeriesConstants.TYPESjava.lang.NumberFormatException - if the formatted value could not be parsed while calculating its long representationpublic NumberSeries(java.lang.String key,
java.lang.String formattedValue,
int type,
java.lang.String template)
key - the number series keyformattedValue - a formatted valuetype - the sequence type see NumberGenerator.NumberSeriesConstants.TYPEStemplate - the template to be applied on generated numberjava.lang.NumberFormatException - if the formatted value could not be parsed while calculating its long representation@Deprecated
public NumberSeries(java.lang.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(java.lang.String key,
long value,
int type,
java.lang.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 java.lang.String getCurrentValue()
getFormatted(int) insteadpublic java.lang.String getFormatted(int digits)
digits - the number of digits to fill; if < 0 no leading zeros are prependedprotected java.lang.String applyPatternIfExists(java.lang.String formattedNumber)
protected java.lang.String replaceSpecialCharacters(java.lang.String template,
java.lang.String formattedNumber)
public java.lang.String getTemplate()
public java.lang.String getKey()
public int getType()
TYPE_ALPHANUMERIC or TYPE_NUMERIC - otherwise
getFormatted(int) will always return numeric values.@Deprecated public void setTemplate(java.lang.String template)
@Deprecated public void setCurrentValue(java.lang.String value)
@Deprecated public void setKey(java.lang.String key)
@Deprecated public void setType(int type)
Copyright © 2018 SAP SE. All Rights Reserved.