Class IsoTime


  • public class IsoTime
    extends Object
    Wrapper for setting and getting model time fields as Date objects and in ISO format strings. Such fields are automatically serialized into and deserialized from JSON. In JSON they are represented as ISO strings.
    • Constructor Detail

      • IsoTime

        public IsoTime​(String isoTime)
        Constructs wrapper from ISO time string
        Parameters:
        isoTime - ISO time
      • IsoTime

        public IsoTime​(Date date)
        Constructs wrapper from Date object
        Parameters:
        date - date object
    • Method Detail

      • setTime

        public void setTime​(String isoTime)
        Sets wrapper time from ISO format time
        Parameters:
        isoTime - ISO format time
      • setTime

        public void setTime​(Date date)
        Sets wrapper time from Date object
        Parameters:
        date - date object
      • getIsoString

        public String getIsoString()
        Returns wrapper time in ISO format
        Returns:
        ISO format time
      • getDate

        public Date getDate()
        Returns wrapper time as Date object
        Returns:
        date object
      • toString

        public String toString()
        Represents the wrapper as ISO format time string
        Overrides:
        toString in class Object