|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.sparql.benchmarking.util.FormatUtils
public class FormatUtils
Helper class with utility methods related to formatting
Method Summary | |
---|---|
static String |
escapeQuotesForCsv(String value)
Escapes quotes in a string for use in a double quoted CSV string |
static String |
formatInstant(org.joda.time.Instant instant)
Formats an instant using the configured instant formatter |
static String |
formatResultCount(long resultCount)
Formats the result count taking account of the special values OperationRun.NOT_YET_RUN or OperationRun.UNKNOWN |
static String |
formatSeconds(double time)
Formats Time to show as seconds |
static String |
formatSeconds(long time)
Formats Time to show as seconds |
static void |
resetInstantFormatter()
Resets the instant formatter to the default which is dd/MM/yyyy HH:mm:ss Z |
static void |
setInstantFormatter(org.joda.time.format.DateTimeFormatter formatter)
Sets the date time formatter to use |
static String |
toCsv(String value)
Formats a string for CSV escaping it as a double quoted CSV string if necessary |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setInstantFormatter(org.joda.time.format.DateTimeFormatter formatter)
formatter
- Formatterpublic static void resetInstantFormatter()
dd/MM/yyyy HH:mm:ss Z
public static String formatSeconds(long time)
time
- Time in nanoseconds
public static String formatSeconds(double time)
time
- Time in nanoseconds
public static String formatInstant(org.joda.time.Instant instant)
instant
- Instant
public static String toCsv(String value)
value
-
public static String escapeQuotesForCsv(String value)
value
-
public static String formatResultCount(long resultCount)
OperationRun.NOT_YET_RUN
or OperationRun.UNKNOWN
resultCount
- Result Count
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |