public final class StringUtils extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.StringBuilder |
append(java.lang.StringBuilder sb,
int[] array,
java.lang.String separator) |
static java.lang.StringBuilder |
append(java.lang.StringBuilder sb,
long[] array,
java.lang.String separator) |
static java.lang.String |
dateToISOString(java.util.Date date)
This method is synchronized for the conversion
|
static java.lang.String |
getDurationString(java.util.Date started,
java.util.Date finished) |
static java.util.Date |
ISOStringToDate(java.lang.String date)
Note: this method will accept microseconds, but the actual microsecond values will be ignored,
passing 2012-05-23T10:32:20.000000Z equals to passing 2012-05-23T10:32:20Z.
|
static java.util.Date |
stringToDate(java.lang.String date)
Uses DataTypeConverter to parse arbitrary date string to Date.
|
public static java.lang.String getDurationString(java.util.Date started, java.util.Date finished)
started
- finished
- public static java.lang.String dateToISOString(java.util.Date date)
date
- public static java.util.Date ISOStringToDate(java.lang.String date)
date
- the passed string in format yyyy-MM-dd'T'HH:mm:ssZpublic static java.util.Date stringToDate(java.lang.String date)
date
- DatatypeConverter.parseDateTime(String)
public static java.lang.StringBuilder append(java.lang.StringBuilder sb, int[] array, java.lang.String separator) throws java.lang.IllegalArgumentException
sb
- array
- array of items to append, if empty or null, this is a no-opseparator
- separator used for the join operation, if empty or null the values will appended without separatorjava.lang.IllegalArgumentException
- on bad datapublic static java.lang.StringBuilder append(java.lang.StringBuilder sb, long[] array, java.lang.String separator) throws java.lang.IllegalArgumentException
sb
- array
- array of items to append, if empty or null, this is a no-opseparator
- separator used for the join operation, if empty or null the values will appended without separatorjava.lang.IllegalArgumentException
- on bad dataCopyright © 2015 Tampere University of Technology, Pori Department.