public class StringUtils
extends java.lang.Object
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
distanceFormat(double distance)
Outputs distance string along with units.
|
static java.lang.String |
memoryFormat(long arg)
Returns formatted string indicating number of bytes.
|
static java.lang.String |
oneDigitFormat(double arg)
For formatting double to 1 decimal place.
|
static java.lang.String |
paddedName(java.lang.String name)
Returns the name passed in, but the first number in the name is padded
with zeros so that the numbers have the same number of digits.
|
static java.lang.String |
padWithBlanks(java.lang.String original,
int desiredCharacters)
Returns original string padded with spaces so that it is
desiredCharacters long.
|
static java.lang.String |
sixDigitFormat(double arg)
For formatting double to 6 decimal places.
|
static void |
sortIds(java.util.List<java.lang.String> ids)
Sorts the list of IDs.
|
static void |
sortIdsNumerically(java.util.List<java.lang.String> ids)
Sorts the list of IDs.
|
static java.lang.String |
threeDigitFormat(double arg)
For formatting double to 3 decimal places.
|
static java.lang.String |
twoDigitFormat(double arg)
For formatting double to 2 decimal places.
|
public static java.lang.String memoryFormat(long arg)
arg
- public static java.lang.String distanceFormat(double distance)
distance
- public static java.lang.String oneDigitFormat(double arg)
arg
- public static java.lang.String twoDigitFormat(double arg)
arg
- public static java.lang.String threeDigitFormat(double arg)
arg
- public static java.lang.String sixDigitFormat(double arg)
arg
- public static java.lang.String padWithBlanks(java.lang.String original, int desiredCharacters)
original
- desiredCharacters
- public static java.lang.String paddedName(java.lang.String name)
name
- The alpha numeric name to be padded.public static void sortIdsNumerically(java.util.List<java.lang.String> ids)
ids
- public static void sortIds(java.util.List<java.lang.String> ids)
ids
- to be sorted