Interface IValueMap

    • Method Detail

      • getString

        String getString​(String key,
                         String defaultValue)
        Retrieves a String by key, using a default value if not found.
        Parameters:
        key - the key
        defaultValue - default value to return if value is null
        Returns:
        the String
      • getString

        String getString​(String key)
        Retrieves a String by key.
        Parameters:
        key - the key
        Returns:
        the String
      • getStringArray

        String[] getStringArray​(String key)
        Retrieves a String array by key. If the value was a String[] it will be returned directly. If it was a String it will be converted to a String array of length one. If it was an array of another type, a String array will be made and each element will be converted to a String.
        Parameters:
        key - the key
        Returns:
        the String array of that key
      • getStringValue

        StringValue getStringValue​(String key)
        Retrieves a StringValue object by key.
        Parameters:
        key - the key
        Returns:
        the StringValue object
      • isImmutable

        boolean isImmutable()
        Returns whether or not this IValueMap is immutable.
        Returns:
        whether or not this IValueMap is immutable
      • makeImmutable

        IValueMap makeImmutable()
        Makes this IValueMap immutable by changing the underlying map representation to a Collections.unmodifiableMap. After calling this method, any attempt to modify this IValueMap will result in a RuntimeException being thrown by the Collections framework.
        Returns:
        this IValueMap
      • getKey

        String getKey​(String key)
        Provided that the hash key is a String and you need to access the value ignoring the key's case (upper- or lowercase letters), then you may use this method to get the correct writing.
        Parameters:
        key - the key
        Returns:
        the key with the correct writing
      • getAsBoolean

        Boolean getAsBoolean​(String key)
        Retrieves a Boolean value by key.
        Parameters:
        key - the key
        Returns:
        the value or null if value is not a valid boolean or no value is in this IValueMap
      • getAsBoolean

        boolean getAsBoolean​(String key,
                             boolean defaultValue)
        Retrieves a boolean value by key.
        Parameters:
        key - the key
        defaultValue - the default to return
        Returns:
        the value or defaultValue if value is not a valid boolean or no value is in this IValueMap
      • getAsInteger

        Integer getAsInteger​(String key)
        Retrieves an Integer value by key.
        Parameters:
        key - the key
        Returns:
        the value or null if value is not a valid integer or no value is in this IValueMap
      • getAsInteger

        int getAsInteger​(String key,
                         int defaultValue)
        Retrieves an integer value by key.
        Parameters:
        key - the key
        defaultValue - the default to return
        Returns:
        the value or defaultValue if value is not a valid integer or no value is in this IValueMap
      • getAsLong

        Long getAsLong​(String key)
        Retrieves a Long value by key.
        Parameters:
        key - the key
        Returns:
        the value or null if value is not a valid long or no value is in this IValueMap
      • getAsLong

        long getAsLong​(String key,
                       long defaultValue)
        Retrieves a long value by key.
        Parameters:
        key - the key
        defaultValue - the default to return
        Returns:
        the value or defaultValue if value is not a valid long or no value is in this IValueMap
      • getAsDouble

        Double getAsDouble​(String key)
        Retrieves a Double value by key.
        Parameters:
        key - the key
        Returns:
        the value or null if value is not a valid double or no value is in this IValueMap
      • getAsDouble

        double getAsDouble​(String key,
                           double defaultValue)
        Retrieves a double value by key.
        Parameters:
        key - the key
        defaultValue - the default to return
        Returns:
        the value or defaultValue if value is not a valid double or no value is in this IValueMap
      • getAsDuration

        Duration getAsDuration​(String key)
        Retrieves a Duration value by key.
        Parameters:
        key - the key
        Returns:
        the value or null if value is not a valid Duration or no value is in this IValueMap
      • getAsDuration

        Duration getAsDuration​(String key,
                               Duration defaultValue)
        Retrieves a Duration value by key.
        Parameters:
        key - the key
        defaultValue - the default to return
        Returns:
        the value or defaultValue if value is not a valid Duration or no value is in this IValueMap
      • getAsInstant

        Instant getAsInstant​(String key)
        Retrieves a Time value by key.
        Parameters:
        key - the key
        Returns:
        the value or null if value is not a valid Time or no value is in this IValueMap
      • getAsTime

        Instant getAsTime​(String key,
                          Instant defaultValue)
        Retrieves a Time value by key.
        Parameters:
        key - the key
        defaultValue - the default to return
        Returns:
        the value or defaultValue if value is not a valid Time or no value is in this IValueMap
      • getAsEnum

        <T extends Enum<T>> T getAsEnum​(String key,
                                        Class<T> eClass)
        Retrieves an Enum value by key.
        Type Parameters:
        T - type of enum
        Parameters:
        key - the key
        eClass - the enumeration class
        Returns:
        the value or null if value is not a valid value of the Enumeration or no value is in this IValueMap
      • getAsEnum

        <T extends Enum<T>> T getAsEnum​(String key,
                                        T defaultValue)
        Retrieves an Enum value by key.
        Type Parameters:
        T - type of enum
        Parameters:
        key - the key
        defaultValue - the default value from the Enumeration (cannot be null)
        Returns:
        the value or defaultValue if value is not a valid value of the Enumeration or no value is in this IValueMap
      • getAsEnum

        <T extends Enum<T>> T getAsEnum​(String key,
                                        Class<T> eClass,
                                        T defaultValue)
        Retrieves an Enum value by key.
        Type Parameters:
        T - type of enum
        Parameters:
        key - the key
        eClass - the enumeration class
        defaultValue - the default value from the Enumeration (may be null)
        Returns:
        the value or defaultValue if value is not a valid value of the Enumeration or no value is in this IValueMap