Class DateConverter<T>

All Implemented Interfaces:
Serializable, Function<Date,T>, ObjectConverter<Date,T>
Direct Known Subclasses:
DateConverter.Long, DateConverter.SQL, DateConverter.Timestamp

abstract class DateConverter<T> extends SystemConverter<Date,T>
Handles conversions from Date to various objects.

String representation

There is currently no converter between String and Date because the date format is not yet defined (we are considering the ISO format for a future SIS version).

Special cases

The converter from dates to timestamps is not injective, because the same date could be mapped to many timestamps since timestamps have an additional nanoseconds field.

Immutability and thread safety

This base class and all inner classes are immutable, and thus inherently thread-safe.
Since:
0.3
Version:
0.3
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • inverse

      The inverse converter. Must be initialized by subclass constructors.
  • Constructor Details

    • DateConverter

      DateConverter(Class<T> targetClass)
      Creates a converter for the given target type. Subclasses must initialize inverse.
  • Method Details