Class StartTime


  • public class StartTime
    extends java.lang.Object
    StartDate is a convenience wrapper allowing for parsing of StartDate in the timezone appropriate to a given master.
    • Constructor Summary

      Constructors 
      Constructor Description
      StartTime​(java.lang.String dateString)
      Construct a StartTime from a date given as string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date getDate()
      Returns Date representation of StartTime as parsed using default timezone.
      java.util.Date getDate​(java.util.TimeZone tz)
      Returns Date representation of StartTime as parsed at a given timezone.
      java.lang.String toString()
      Returns a string representation of StartTime.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • dateString

        private final java.lang.String dateString
      • defaultTzDate

        private final transient java.util.Date defaultTzDate
      • startJobDateFormat

        private final transient java.text.SimpleDateFormat startJobDateFormat
    • Constructor Detail

      • StartTime

        public StartTime​(java.lang.String dateString)
                  throws ParsingException
        Construct a StartTime from a date given as string.
        Parameters:
        dateString - the start time formatted as string to be parsed
        Throws:
        ParsingException - in case of a problem while parsing dateString
    • Method Detail

      • getDate

        public java.util.Date getDate​(java.util.TimeZone tz)
        Returns Date representation of StartTime as parsed at a given timezone. Master does not return a timezone associated with StartTime timestamp string, therefore an explicit timezone needs to be provided for correct parsing.
        Parameters:
        tz - TimeZone associated with master.
        Returns:
        Date representation of StartTime at provided timezone
      • getDate

        public java.util.Date getDate()
        Returns Date representation of StartTime as parsed using default timezone.

        NOTE: If master is using a different timezone than the default timezone of the user of this API, then the returned Date will be incorrect.

        Returns:
        Date representation of StartTime using default timezone.
      • toString

        public java.lang.String toString()
        Returns a string representation of StartTime. This is the same string that is passed to the constructor.
        Overrides:
        toString in class java.lang.Object