Returns the given property as a boolean Property values are case insensitive and the following values will result in a True return value: - 1 - True - Yes Any other values, including an empty string, will result in a False @param property The property to fetch @return A parsed boolean @throws NullPo
(final String property)
| 192 | * @throws NullPointerException if the property was not found |
| 193 | */ |
| 194 | public final boolean getBoolean(final String property) { |
| 195 | |
| 196 | if (properties.containsKey(property)) { |
| 197 | final String val = properties.get(property).toUpperCase(); |
| 198 | |
| 199 | if (val.equals("1")) |
| 200 | return true; |
| 201 | if (val.equals("TRUE")) |
| 202 | return true; |
| 203 | if (val.equals("YES")) |
| 204 | return true; |
| 205 | } |
| 206 | |
| 207 | return false; |
| 208 | } |
| 209 | |
| 210 | /** |
| 211 | * Returns the directory name, making sure the end is an OS dependent slash |