Class ContainerEnvironment
-
- All Implemented Interfaces:
-
java.io.Serializable
public class ContainerEnvironment implements Serializable
Encapsulates environment variables to be used when starting a container. If Providers are added they are stored as is. Provider.get is not called until ContainerEnvironment.toList or ContainerEnvironment.toString are called. So the actual value is determined lazily.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classContainerEnvironment.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static ContainerEnvironment.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description ContainerEnvironment()
-
Method Summary
Modifier and Type Method Description final ContainerEnvironmentadd(String key, Object value)Adds an environment variable with a name of keyand a value ofvalueifvalue != null.final ContainerEnvironmentadd(Pair<String, Object> entry)Just calls ContainerEnvironment.add with key=Pair.firstandvalue=Pair.secondfinal ContainerEnvironmentaddAll(Pair<String, Object> entries)Adds multiply environment variables calling ContainerEnvironment.add for each final List<String>toList()final Map<String, String>toMap()final ContainerEnvironmentmerge(ContainerEnvironment other)StringtoString()-
-
Method Detail
-
add
final ContainerEnvironment add(String key, Object value)
Adds an environment variable with a name of
keyand a value ofvalueifvalue != null.
-
add
final ContainerEnvironment add(Pair<String, Object> entry)
Just calls ContainerEnvironment.add with
key=Pair.firstandvalue=Pair.second
-
addAll
final ContainerEnvironment addAll(Pair<String, Object> entries)
Adds multiply environment variables calling ContainerEnvironment.add for each
-
merge
final ContainerEnvironment merge(ContainerEnvironment other)
-
-
-
-