Class Duration

    • Constructor Detail

      • Duration

        public Duration​(Duration duration)
                 throws IllegalArgumentException
        Construct DurationType by the parsing the given string
        Parameters:
        duration - The String to be parsed into DurationType
        Throws:
        IllegalArgumentException - if the given argument is not a valid Duration
    • Method Detail

      • toString

        public String toString()
        Returns a String Object representing this DurationType's value
        Overrides:
        toString in class Object
        Returns:
        return a string representation of the value of this DurationType object
      • valueOf

        public static Duration valueOf​(String stringValue)
                                throws IllegalArgumentException
        Returns a DurationType instance representing the specified String value
        Parameters:
        stringValue - a String value
        Returns:
        return a DurationType instance representing stringValue
        Throws:
        IllegalArgumentException - if the given argument is not a valid Duration
      • getValue

        public Duration getValue()
        Returns the value of this DurationType object as an Duration
        Returns:
        the Duration value of this DurationType object.
      • isValid

        public static boolean isValid​(Duration duration)
        check if the specified Duration instance is a valid duration data type
        Parameters:
        duration - the value to be tested
        Returns:
        true if the value of argument is valid for duration data type false otherwise