From 0e3e719dd6f9592cb8dcb0beaff616c1d99fae03 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 25 Oct 2013 13:25:46 -0500 Subject: [PATCH] Add the Boolean#getBoolean method Signed-off-by: Johannes Schindelin --- classpath/java/lang/Boolean.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classpath/java/lang/Boolean.java b/classpath/java/lang/Boolean.java index 57137d24e8..21b75000f3 100644 --- a/classpath/java/lang/Boolean.java +++ b/classpath/java/lang/Boolean.java @@ -59,6 +59,10 @@ public final class Boolean implements Comparable { 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"); }