Class MetricConfig

    • Constructor Detail

      • MetricConfig

        public MetricConfig()
    • Method Detail

      • getString

        public String getString​(String key,
                                String defaultValue)
        Returns the value associated with the given key as a String.

        If the value is not a String, its toString() representation is returned.

        Parameters:
        key - the hashtable key.
        defaultValue - a default value.
        Returns:
        the value in this property list with the specified key value as a String.
      • getInteger

        public int getInteger​(String key,
                              int defaultValue)
        Returns the value associated with the given key as an int.

        If the value is a Number, its intValue() is returned directly. Otherwise, the value's string representation is parsed via Integer.parseInt(String).

        Parameters:
        key - the hashtable key.
        defaultValue - a default value.
        Returns:
        the value in this property list with the specified key value as an int.
      • getLong

        public long getLong​(String key,
                            long defaultValue)
        Returns the value associated with the given key as a long.

        If the value is a Number, its longValue() is returned directly. Otherwise, the value's string representation is parsed via Long.parseLong(String).

        Parameters:
        key - the hashtable key.
        defaultValue - a default value.
        Returns:
        the value in this property list with the specified key value as a long.
      • getFloat

        public float getFloat​(String key,
                              float defaultValue)
        Returns the value associated with the given key as a float.

        If the value is a Number, its floatValue() is returned directly. Otherwise, the value's string representation is parsed via Float.parseFloat(String).

        Parameters:
        key - the hashtable key.
        defaultValue - a default value.
        Returns:
        the value in this property list with the specified key value as a float.
      • getDouble

        public double getDouble​(String key,
                                double defaultValue)
        Returns the value associated with the given key as a double.

        If the value is a Number, its doubleValue() is returned directly. Otherwise, the value's string representation is parsed via Double.parseDouble(String).

        Parameters:
        key - the hashtable key.
        defaultValue - a default value.
        Returns:
        the value in this property list with the specified key value as a double.
      • getBoolean

        public boolean getBoolean​(String key,
                                  boolean defaultValue)
        Returns the value associated with the given key as a boolean.

        If the value is a Boolean, it is returned directly. Otherwise, the value's string representation is parsed via Boolean.parseBoolean(String).

        Parameters:
        key - the hashtable key.
        defaultValue - a default value.
        Returns:
        the value in this property list with the specified key value as a boolean.