(Properties props, String key, float defOffset)
| 77 | } |
| 78 | |
| 79 | public static float readFloat(Properties props, String key, float defOffset) |
| 80 | { |
| 81 | String s = props.getProperty(key); |
| 82 | |
| 83 | if (s == null) |
| 84 | { |
| 85 | return defOffset; |
| 86 | } |
| 87 | else |
| 88 | { |
| 89 | float f = Config.parseFloat(s, Float.MIN_VALUE); |
| 90 | |
| 91 | if (f == Float.MIN_VALUE) |
| 92 | { |
| 93 | Config.warn("Invalid value for " + key + ": " + s); |
| 94 | return defOffset; |
| 95 | } |
| 96 | else |
| 97 | { |
| 98 | return f; |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | public static boolean readBoolean(Properties props, String key, boolean defVal) |
| 104 | { |
no test coverage detected