public class MappingUtils
extends java.lang.Object
Constructor and Description |
---|
MappingUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getMaxDate(java.lang.String one,
java.lang.String two)
Get the max of two dates.
|
static java.lang.String |
getMaxValue(java.lang.String one,
java.lang.String two)
Get the max of two numbers.
|
static java.lang.String |
getMinDate(java.lang.String one,
java.lang.String two)
Get the min of two dates.
|
static java.lang.String |
getMinValue(java.lang.String one,
java.lang.String two)
Get the min of two numbers.
|
static java.lang.String |
getSystemDate()
Get the current system date.
|
static java.lang.String |
getSystemDateTime()
Get the system date and time.
|
static java.lang.String |
getSystemTime()
Get the current system time.
|
static java.lang.String |
leftJust(java.lang.String input,
int size) |
static java.lang.String |
leftJust(java.lang.String input,
int size,
char pad) |
static java.lang.String |
padValue(java.lang.String input,
int size,
char pad,
char justify)
Deprecated.
|
static java.lang.String |
rightJust(java.lang.String input,
int size) |
static java.lang.String |
rightJust(java.lang.String input,
int size,
char pad) |
public static java.lang.String padValue(java.lang.String input, int size, char pad, char justify)
leftJust(String, int)
or
rightJust(String, int)
input
- - value to be padded outsize
- - size of field to be returnedpad
- - the character to be used to pad the inputjustify
- - L or R i.e. left or right justify the resultpublic static java.lang.String leftJust(java.lang.String input, int size)
Justify.left(String,int)
public static java.lang.String leftJust(java.lang.String input, int size, char pad)
Justify.trailing(String, int, char)
public static java.lang.String rightJust(java.lang.String input, int size)
Justify.right(String, int)
public static java.lang.String rightJust(java.lang.String input, int size, char pad)
Justify.leading(String, int, char)
public static java.lang.String getSystemDate()
public static java.lang.String getSystemTime()
public static java.lang.String getSystemDateTime()
public static java.lang.String getMinValue(java.lang.String one, java.lang.String two)
This method returns the smaller of two string representations of numbers. All non-numeric characters are removed during comparison but the original string is returned. Example: 123xxx01 and 23+42 would be compared as 12301 and 2342
one
- - the first valuetwo
- - the second valuepublic static java.lang.String getMaxValue(java.lang.String one, java.lang.String two)
This method returns the larger of two string representations of numbers. All non-numeric characters are removed during comparison but the original string is returned. Example: 123xxx01 and 23+42 would be compared as 12301 and 2342
one
- - the first valuetwo
- - the second valuepublic static java.lang.String getMinDate(java.lang.String one, java.lang.String two)
This method returns the smaller of two string representations of dates. The dates must be in either of the following formats: yyyyMMdd (e.g. 20011225) yyyyMMdd HH:mm (e.g. 20011225 12:01)
one
- - the first datetwo
- - the second datepublic static java.lang.String getMaxDate(java.lang.String one, java.lang.String two)
This method returns the larger of two string representations of dates. The dates must be in either of the following formats: yyyyMMdd (e.g. 20011225) yyyyMMdd HH:mm (e.g. 20011225 12:01)
one
- - the first datetwo
- - the second date