Skip to content

Commit 13ad50b

Browse files
author
soheil_h_y
committed
1.parseBoolean is implemented
1 parent 42cd313 commit 13ad50b

File tree

1 file changed

+8
-0
lines changed
  • sources/net.sf.j2s.java.core/src/java/lang

1 file changed

+8
-0
lines changed

sources/net.sf.j2s.java.core/src/java/lang/Boolean.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ Boolean.prototype.booleanValue=function(){
33
return this.valueOf();
44
}
55

6+
Boolean.prototype.parseBoolean = function(val){
7+
if(val == "false" || val == false){
8+
return false;
9+
}
10+
return true;
11+
}
12+
13+
Boolean.$valueOf = Boolean.parseBoolean = Boolean.prototype.parseBoolean;
614

715
Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true);
816
Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false);

0 commit comments

Comments
 (0)