Class DateWrapper

  • All Implemented Interfaces:
    java.io.Serializable

    public class DateWrapper
    extends java.lang.Object
    implements java.io.Serializable
    A wrapper class that provides a field to describe if the date/time is precise or just an approximation.
    See Also:
    Serialized Form
    • Constructor Detail

      • DateWrapper

        @Deprecated
        public DateWrapper​(@Nonnull
                           java.util.Calendar calendar)
        Deprecated.
      • DateWrapper

        public DateWrapper​(@Nonnull
                           java.time.OffsetDateTime offsetDateTime)
      • DateWrapper

        public DateWrapper​(@Nonnull
                           java.time.OffsetDateTime offsetDateTime,
                           boolean isApproximation)
    • Method Detail

      • date

        @Deprecated
        @Nonnull
        public java.util.Calendar date()
        Deprecated.
        use offsetDateTime() instead.
        Returns:
        the wrapped date/time as a Calendar.
      • offsetDateTime

        @Nonnull
        public java.time.OffsetDateTime offsetDateTime()
        Returns:
        the wrapped date/time.
      • isApproximation

        public boolean isApproximation()
        Returns:
        if the date is considered is precise or just an approximation (e.g. service only returns an approximation like 2 weeks ago instead of a precise date).