Package org.bytemechanics.commons.string
Class Stringify
- java.lang.Object
-
- org.bytemechanics.commons.string.Stringify
-
public final class Stringify extends Object
To string utility converter- Author:
- afarre
-
-
Constructor Summary
Constructors Constructor Description Stringify()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
toString(Throwable _stacktrace)
Prints stacktrace as string (null protected).static String
toString(Duration _duration, String _pattern)
Format duration as string (null protected)
-
-
-
Method Detail
-
toString
public static final String toString(Throwable _stacktrace)
Prints stacktrace as string (null protected).- Parameters:
_stacktrace
- exception to generate stacktrace if is null then return "null" string- Returns:
- Stacktrace in string format and if any error happens return a text with the error
-
toString
public static final String toString(Duration _duration, String _pattern)
Format duration as string (null protected)- Parameters:
_duration
- exception to generate stacktrace if is null then return "null" string_pattern
- pattern to use if null uses ISO_TIME- Returns:
- duration in format provided or string with an error if failed
-
-