summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/gnu/java/beans/editors/NativeBooleanEditor.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/java/beans/editors/NativeBooleanEditor.java')
-rw-r--r--libjava/classpath/gnu/java/beans/editors/NativeBooleanEditor.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/libjava/classpath/gnu/java/beans/editors/NativeBooleanEditor.java b/libjava/classpath/gnu/java/beans/editors/NativeBooleanEditor.java
index 3620cc1747a..1df94895a3c 100644
--- a/libjava/classpath/gnu/java/beans/editors/NativeBooleanEditor.java
+++ b/libjava/classpath/gnu/java/beans/editors/NativeBooleanEditor.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -52,25 +52,25 @@ import java.beans.PropertyEditorSupport;
**/
public class NativeBooleanEditor extends PropertyEditorSupport {
- String[] tags = {"true","false"};
+ String[] tags = {"true","false"};
- /**
- * setAsText for boolean checks for true or false or t or f.
- * "" also means false.
- **/
- public void setAsText(String val) throws IllegalArgumentException {
- if(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("t")) {
- setValue(Boolean.TRUE);
- } else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) {
- setValue(Boolean.FALSE);
- } else {
- throw new IllegalArgumentException("Value must be true, false, t, f or empty.");
- }
- }
+ /**
+ * setAsText for boolean checks for true or false or t or f.
+ * "" also means false.
+ **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ if(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("t")) {
+ setValue(Boolean.TRUE);
+ } else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) {
+ setValue(Boolean.FALSE);
+ } else {
+ throw new IllegalArgumentException("Value must be true, false, t, f or empty.");
+ }
+ }
- /** getAsText for boolean calls Boolean.toString(). **/
- public String getAsText() {
- return getValue().toString();
- }
+ /** getAsText for boolean calls Boolean.toString(). **/
+ public String getAsText() {
+ return getValue().toString();
+ }
}
OpenPOWER on IntegriCloud