Skip to content

Commit

Permalink
Adds getBooleanSetting function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkryst committed Sep 4, 2017
1 parent f768d59 commit 11d25cb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/configuration/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,22 @@ public void loadFromFile() throws IOException, ParseException {
validateSettings();
}

/**
* Retrieves a setting as a boolean.
*
* @param setting
* The setting.
*
* @return
* The value.
*
* @throws NumberFormatException
* If the setting string doesn't contain a parsable boolean.
*/
public boolean getBooleanSetting(final @NonNull String setting) {
return Boolean.valueOf(settings.get(setting));
}

/**
* Retrieves a setting as a byte.
*
Expand Down

0 comments on commit 11d25cb

Please sign in to comment.