Class ThreadSafeSimpleDateFormat

java.lang.Object
java.text.Format
java.text.DateFormat
com.helixframework.time.format.ThreadSafeSimpleDateFormat
All Implemented Interfaces:
Serializable, Cloneable

@ThreadSafe public class ThreadSafeSimpleDateFormat extends DateFormat
This class is a thread-safe implementation of the DateFormat class that wraps around a SimpleDateFormat object. It ensures that each thread gets its own instance of SimpleDateFormat and that these instances are properly initialized, avoiding any clash or race conditions. It provides methods for formatting and parsing dates and also includes methods for setting timezone, calendar, number format, lenient flag, date format symbols, and 2-digit year start.
See Also:
  • Constructor Details

    • ThreadSafeSimpleDateFormat

      public ThreadSafeSimpleDateFormat(String format)
      This class is a thread-safe implementation of the DateFormat class that wraps around a SimpleDateFormat object. It ensures that each thread gets its own instance of SimpleDateFormat and that these instances are properly initialized, avoiding any clash or race conditions. It provides methods for formatting and parsing dates and also includes methods for setting timezone, calendar, number format, lenient flag, date format symbols, and 2-digit year start.
  • Method Details