Interface Configuration

All Known Implementing Classes:
AbstractConfiguration, DelegateConfiguration, EmptyConfiguration, HierarchicalConfiguration, MapConfiguration, YamlConfiguration

public interface Configuration
  • Method Details

    • get

      Optional<Object> get(String key)
    • getString

      Optional<String> getString(String key)
    • getStringMandatory

      String getStringMandatory(String key)
    • getStringMandatory

      String getStringMandatory(String key, String errorMessage)
    • getInt

      Optional<Integer> getInt(String key)
    • getIntMandatory

      int getIntMandatory(String key)
    • getIntMandatory

      int getIntMandatory(String key, String errorMessage)
    • getDouble

      Optional<Double> getDouble(String key)
    • getDoubleMandatory

      double getDoubleMandatory(String key)
    • getDoubleMandatory

      double getDoubleMandatory(String key, String errorMessage)
    • getBoolean

      Optional<Boolean> getBoolean(String key)
    • getBooleanMandatory

      boolean getBooleanMandatory(String key)
    • getBooleanMandatory

      boolean getBooleanMandatory(String key, String errorMessage)
    • isList

      boolean isList(String key)
    • getStringList

      List<String> getStringList(String key)
    • getStringListMandatory

      List<String> getStringListMandatory(String key, String errorMessage)
    • getStringListMandatory

      List<String> getStringListMandatory(String key)
    • getStringOrList

      List<String> getStringOrList(String key)
      Gets value under key and returns as list. If value is not a list, singleton list is returned. If value is missing, empty list is returned.
    • listKeys

      Set<String> listKeys()
      Lists all keys in configuration
      Returns:
      List of keys
    • listPrefixes

      Set<String> listPrefixes()
      Lists configuration key prefixes of length=1

      E.g. for configuration with keys: a.b.c a.d.e b

      listPrefixes() would return ["a", "b"]

    • getSubconfiguration

      Configuration getSubconfiguration(String keyPrefix)
      Returns configuration containing all keys starting with given prefix. Keys for returned configuration are stripped of this prefix.
      Parameters:
      keyPrefix - Prefix to search for
      Returns:
      Configuration containing all keys starting with given prefix.
    • asMap

      Map<String,Object> asMap()