public class PRStringFormat
extends java.lang.Object
Note that the String to Java type conversions deal exclusively with standard PegaRULES formats and do not apply the heuristics used in conjunction with PegaRULES input processing or ClipboardProperty. validation.
Note that a null
value object must never be passed to these
methods -- no check for null
is made and a NullPointerException
will be thrown if a value is missing.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.util.Date |
oFallbackDate |
static java.lang.String |
VERSION |
Constructor and Description |
---|
PRStringFormat() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
anyToPega(char aExpectedType,
java.lang.Object aValue) |
static java.lang.String |
bigDecimalToPega(char aType,
com.pega.ibm.icu.math.BigDecimal aValue)
Convert from an ICU BigDecimal value to PegaRULES standard form
|
static java.lang.String |
booleanToPega(char aType,
boolean aValue)
Convert from a Java boolean value to PegaRULES standard form
|
static java.lang.String |
dateToPega(char aType,
java.util.Date aValue)
Convert from a Java Date value to PegaRULES standard form
|
static java.lang.String |
doubleToPega(char aType,
double aValue)
Convert from a Java double value to PegaRULES standard form
|
static java.lang.String |
intToPega(char aType,
int aValue)
Convert from a Java int value to PegaRULES standard form
|
static boolean |
isValidDate(java.util.Date inputDate) |
static java.lang.String |
localizedStringToPega(char aType,
java.lang.String aValue,
java.lang.String aLocale,
int aDecimalDigits)
Convert from a Java String containing a localized value to PegaRULES standard form
|
static java.lang.Object |
pegaToAny(char aType,
java.lang.String aValue,
java.lang.String aName,
char aTargetType) |
static com.pega.ibm.icu.math.BigDecimal |
pegaToBigDecimal(char aType,
java.lang.String aValue,
java.lang.String aName)
Convert from PegaRULES standard form to ICU BigDecimal
|
static boolean |
pegaToBoolean(char aType,
java.lang.String aValue,
boolean aDefault,
java.lang.String aName)
Convert from PegaRULES standard form to Java boolean
|
static java.util.Date |
pegaToDate(char aType,
java.lang.String aValue,
java.lang.String aName)
Convert from PegaRULES standard form to Java Date
|
static double |
pegaToDouble(char aType,
java.lang.String aValue,
java.lang.String aName)
Convert from PegaRULES standard form to Java double
|
static int |
pegaToInteger(char aType,
java.lang.String aValue,
java.lang.String aName)
Convert from PegaRULES standard form to Java int
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
public static final java.util.Date oFallbackDate
public static final java.lang.String bigDecimalToPega(char aType, com.pega.ibm.icu.math.BigDecimal aValue)
aType
- PropertyInfo type code for target ClipboardPropertyaValue
- value to be convertedpublic static final java.lang.String booleanToPega(char aType, boolean aValue)
aType
- PropertyInfo type code for target ClipboardPropertyaValue
- value to be convertedpublic static final java.lang.String dateToPega(char aType, java.util.Date aValue)
aType
- PropertyInfo type code for target ClipboardPropertyaValue
- value to be convertedpublic static final java.lang.String doubleToPega(char aType, double aValue)
aType
- PropertyInfo type code for target ClipboardPropertyaValue
- value to be convertedpublic static final java.lang.String intToPega(char aType, int aValue)
aType
- PropertyInfo type code for target ClipboardPropertyaValue
- value to be convertedpublic static final java.lang.String localizedStringToPega(char aType, java.lang.String aValue, java.lang.String aLocale, int aDecimalDigits)
aType
- PropertyInfo type code for target ClipboardPropertyaValue
- localized value to be convertedaLocale
- locale name in which value is to be interpretedaDecimalDigits
- number of digits to right of decimal point, or -1 for "as many as needed"public static final boolean isValidDate(java.util.Date inputDate)
public static final com.pega.ibm.icu.math.BigDecimal pegaToBigDecimal(char aType, java.lang.String aValue, java.lang.String aName)
aType
- PropertyInfo type code for source ClipboardPropertyaValue
- value to be convertedaName
- ClipboardProperty name for diagnostics, or null
InvalidValueException
public static final boolean pegaToBoolean(char aType, java.lang.String aValue, boolean aDefault, java.lang.String aName)
aType
- PropertyInfo type code for source ClipboardPropertyaValue
- value to be convertedaDefault
- default value if zero-length String suppliedaName
- ClipboardProperty name for diagnostics, or null
InvalidValueException
public static final java.util.Date pegaToDate(char aType, java.lang.String aValue, java.lang.String aName)
aType
- PropertyInfo type code for source ClipboardPropertyaValue
- value to be convertedaName
- ClipboardProperty name for diagnostics, or null
InvalidValueException
public static final double pegaToDouble(char aType, java.lang.String aValue, java.lang.String aName)
aType
- PropertyInfo type code for source ClipboardPropertyaValue
- value to be convertedaName
- ClipboardProperty name for diagnostics, or null
InvalidValueException
public static final int pegaToInteger(char aType, java.lang.String aValue, java.lang.String aName)
aType
- PropertyInfo type code for source ClipboardPropertyaValue
- value to be convertedaName
- ClipboardProperty name for diagnostics, or null
InvalidValueException
public static final java.lang.Object pegaToAny(char aType, java.lang.String aValue, java.lang.String aName, char aTargetType)
public static java.lang.String anyToPega(char aExpectedType, java.lang.Object aValue)
Copyright © 2018 Pegasystems Inc. All Rights Reserved.