Class ConfigurationParameters.Milliseconds

  • Enclosing class:
    ConfigurationParameters

    public static final class ConfigurationParameters.Milliseconds
    extends java.lang.Object
    Helper class for configuration parameters that denote a "duration", such as a timeout or expiration time.
    • Method Detail

      • of

        public static ConfigurationParameters.Milliseconds of​(long value)
        Returns a new milliseconds object from the given long value.
        Parameters:
        value - the value
        Returns:
        the milliseconds object
      • of

        @Nullable
        public static @Nullable ConfigurationParameters.Milliseconds of​(@Nullable
                                                                        @Nullable java.lang.String str)
        Parses a value string into a duration. the String has the following format: <xmp> format:= (value [ unit ])+; value:= float value; unit: "ms" | "s" | "m" | "h" | "d"; </xmp> Example: <xmp> "100", "100ms" : 100 milliseconds "1s 50ms": 1050 milliseconds "1.5d": 1 1/2 days == 36 hours. </xmp>
        Parameters:
        str - the string to parse
        Returns:
        the new Milliseconds object or null.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object