Package-level declarations
Types
Link copied to clipboard
The
JsonHelper
class is a useful tool class to works with "JSON"
data formatLink copied to clipboard
The
ScientificNotationParser
class is a useful tool class to get a numeric value without scientific notation
// without use ScientificNotationParser
double number = 0.0000092221111228;
System.out.println(number); // --> 9.2221111228E-6
// using ScientificNotationParser
double number = 0.0000092221111228;
System.out.println(ScientificNotationParser.sNotationParse(number));
// --> 0.0000092221111228
Content copied to clipboard
Link copied to clipboard
The
TimeFormatter
class is a useful tool class to format in different ways the "time"
// Get an instance of the TimeFormatter
TimeFormatter timeFormatter = TimeFormatter.getInstance();
// Change the values of the formatter
timeFormatter.changeFormatter("new_pattern", new_locale);
// or pass pattern as argument in all methods to change only in that formatting
String stringDate = timeFormatter.formatNowAsString("yyyy/MM/dd HH:mm:ss"); // --> 2024/04/14 13:46:30
// string format
String stringDate = timeFormatter.formatAsString(time_in_millis); // --> 2024/04/14 13:46:30
// long format
System.out.println(timeFormatter.formatAsTimestamp("string_date")); // --> 1670261677000
// date format
// with string as argument
System.out.println(timeFormatter.formatAsDate("string_date")); // --> Sun Apr 14 13:46:30 CET 2024
// with long as argument
System.out.println(timeFormatter.formatAsDate(time_in_millis); // --> Sun Apr 14 13:46:30 CET 2024
Content copied to clipboard