comparison core/src/luan/Luan.java @ 443:bf5e62a9090c

remove toBoolean() and to_boolean()
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 04 May 2015 14:55:51 -0600
parents 93e6e67768d7
children bbad2d06f728
comparison
equal deleted inserted replaced
442:75ccb4da803f 443:bf5e62a9090c
43 if( obj instanceof LuanFunction ) 43 if( obj instanceof LuanFunction )
44 return "function"; 44 return "function";
45 if( obj instanceof byte[] ) 45 if( obj instanceof byte[] )
46 return "binary"; 46 return "binary";
47 return "userdata"; 47 return "userdata";
48 }
49
50 public static boolean toBoolean(Object obj) {
51 return obj != null && !Boolean.FALSE.equals(obj);
52 } 48 }
53 49
54 public static Number toNumber(Object obj) { 50 public static Number toNumber(Object obj) {
55 return toNumber(obj,null); 51 return toNumber(obj,null);
56 } 52 }