Package ej.property
Interface PropertyLoader
-
- All Known Subinterfaces:
PropertyRegistry,SharedPropertyRegistry
- All Known Implementing Classes:
CompositePropertyLoader,FilePropertyLoader,SimplePropertyRegistry,SystemPropertyLoader
public interface PropertyLoaderA property loader is a map of properties. The keys and their corresponding values are strings.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetProperty(java.lang.String key)Gets the value mapped with the specified key.java.lang.StringgetProperty(java.lang.String key, java.lang.String defaultValue)Gets the value mapped with the specified key or a default value.
-
-
-
Method Detail
-
getProperty
@Nullable java.lang.String getProperty(java.lang.String key)
Gets the value mapped with the specified key.- Parameters:
key- the key.- Returns:
- the value of the property, or
nullif the property is not found. - Throws:
java.lang.SecurityException- if a security manager exists and does not allow the caller to retrieve the given property.
-
getProperty
java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)Gets the value mapped with the specified key or a default value.- Parameters:
key- the key.defaultValue- the default value.- Returns:
- the value of the property, or the default value if the property is not found.
- Throws:
java.lang.SecurityException- if a security manager exists and does not allow the caller to retrieve the given property.
-
-