Parse options from environment
[rhynodge.git] / src / main / java / net / pterodactylus / util / envopt / SystemEnvironment.java
1 package net.pterodactylus.util.envopt;
2
3 import java.util.Optional;
4
5 /**
6  * {@link Environment} implementation that reads variables from the system environment.
7  *
8  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
9  * @see System#getenv(String)
10  */
11 public class SystemEnvironment implements Environment {
12
13         @Override
14         public Optional<String> getValue(String name) {
15                 return Optional.ofNullable(System.getenv(name));
16         }
17
18 }