Interface Configuration.ListValue

  • Enclosing interface:
    Configuration

    public static interface Configuration.ListValue
    Return a List of values for a configuration key.

    Example

    
    
      List<Integer> codes = Config.getList().ofInt("my.codes", 42, 54);
    
     
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<String> of​(String key)
      Return the list of values for the key returning an empty collection if the configuration is not defined.
      List<String> of​(String key, String... defaultValues)
      Return the list of values for the key returning the default values if the configuration is not defined.
      List<Integer> ofInt​(String key)
      Return the list of integer values for the key returning an empty collection if the configuration is not defined.
      List<Integer> ofInt​(String key, int... defaultValues)
      Return the list of integer values for the key returning the default values if the configuration is not defined.
      List<Long> ofLong​(String key)
      Return the list of long values for the key returning an empty collection if the configuration is not defined.
      List<Long> ofLong​(String key, long... defaultValues)
      Return the long values for the key returning the default values if the configuration is not defined.
    • Method Detail

      • of

        List<Stringof​(String key)
        Return the list of values for the key returning an empty collection if the configuration is not defined.
        Parameters:
        key - The configuration key
        Returns:
        The configured values or an empty list if not defined
      • of

        List<Stringof​(String key,
                        String... defaultValues)
        Return the list of values for the key returning the default values if the configuration is not defined.
        Parameters:
        key - The configuration key
        Returns:
        The configured values or default values
      • ofInt

        List<IntegerofInt​(String key)
        Return the list of integer values for the key returning an empty collection if the configuration is not defined.
        Parameters:
        key - The configuration key
        Returns:
        The configured values or an empty list if not defined
      • ofInt

        List<IntegerofInt​(String key,
                            int... defaultValues)
        Return the list of integer values for the key returning the default values if the configuration is not defined.
        Parameters:
        key - The configuration key
        Returns:
        The configured values or default values
      • ofLong

        List<LongofLong​(String key)
        Return the list of long values for the key returning an empty collection if the configuration is not defined.
        Parameters:
        key - The configuration key
        Returns:
        The configured values or an empty list if not defined
      • ofLong

        List<LongofLong​(String key,
                          long... defaultValues)
        Return the long values for the key returning the default values if the configuration is not defined.
        Parameters:
        key - The configuration key
        Returns:
        The configured values or default values