Class SimplePropertySource
java.lang.Object
io.fluxcapacitor.common.application.SimplePropertySource
- All Implemented Interfaces:
PropertySource
A simple in-memory implementation of the
PropertySource
interface backed by a Map
.
This class is typically used for programmatic configuration, testing, or cases where property values are supplied dynamically at runtime from an explicit key-value source.
Example usage:
Map<String, String> props = Map.of("api.key", "12345", "timeout", "1000");
PropertySource propertySource = new SimplePropertySource(props);
String apiKey = propertySource.get("api.key");
- See Also:
-
Field Summary
Fields inherited from interface io.fluxcapacitor.common.application.PropertySource
substitutionPattern
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.fluxcapacitor.common.application.PropertySource
andThen, containsProperty, get, getBoolean, getBoolean, require, substituteProperties
-
Constructor Details
-
SimplePropertySource
public SimplePropertySource()
-
-
Method Details
-
get
Retrieves the value associated with the given property name from the internal map.- Specified by:
get
in interfacePropertySource
- Parameters:
name
- the name of the property to retrieve- Returns:
- the corresponding property value, or
null
if not present
-