Add the Boolean#getBoolean method

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2013-10-25 13:25:46 -05:00
parent 95fcc9ac8e
commit 0e3e719dd6

View File

@ -59,6 +59,10 @@ public final class Boolean implements Comparable<Boolean> {
return value;
}
public static boolean getBoolean(String name) {
return parseBoolean(System.getProperty(name));
}
public static boolean parseBoolean(String string) {
return string != null && string.equalsIgnoreCase("true");
}