Class MetadataTime

    • Constructor Detail

      • MetadataTime

        public MetadataTime​(long time,
                            TimeType type)
    • Method Detail

      • parse

        public static MetadataTime parse​(String timestr)
                                  throws IllegalArgumentException
        Creates a MetadataTime object from a string
        Parameters:
        timestr - string representation of a metatdata time, ex. "M12345678"
        Returns:
        a MetadataTime object represented by string
        Throws:
        IllegalArgumentException - if timesstr == null or timestr.length() <= 1)
      • getType

        public static TimeType getType​(char code)
        Converts timetypes to data codes used in the table data implementation
        Parameters:
        code - character M or L otherwise exception thrown
        Returns:
        a TimeType TimeType represented by code.
      • getCode

        public static char getCode​(TimeType type)
        Returns:
        the single char code of this objects timeType
      • getCode

        public char getCode()
      • encode

        public String encode()
      • getTime

        public long getTime()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object