Package com.github.jsixface
Class YamlConfig
- java.lang.Object
-
- com.github.jsixface.YamlConfig
-
public class YamlConfig extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetInt(String key)Gets the Integer value for the specified key from the config.StringgetString(String key)Gets the String value for the specified key from the config.static YamlConfigload(InputStream in)Create configuration from input streamstatic YamlConfigload(Reader reader)Create configuration from Readerstatic YamlConfigload(org.yaml.snakeyaml.Yaml yaml, InputStream in)Create configuration from input stream, using your yaml instance
-
-
-
Method Detail
-
load
public static YamlConfig load(Reader reader)
Create configuration from Reader- Parameters:
reader- the reader to read config from- Returns:
- YamlConfig instance
-
load
public static YamlConfig load(InputStream in)
Create configuration from input stream- Parameters:
in- the Input stream to read from- Returns:
- YamlConfig instance
-
load
public static YamlConfig load(org.yaml.snakeyaml.Yaml yaml, InputStream in)
Create configuration from input stream, using your yaml instance- Parameters:
yaml- the Yaml instance to usein- the Input stream to read from- Returns:
- YamlConfig instance
-
getString
public String getString(String key)
Gets the String value for the specified key from the config.- Parameters:
key- Key in dotted notation likefirst.second[2].third- Returns:
- The String value of property.
nullif the key is not present or not a leaf node.BooleanorIntegeror other format are converted to String.
-
-