List of utility methods to do Boolean From
Boolean | toBoolean(Object o) to Boolean if (o == null) { return null; } else if (o instanceof Boolean) { return (Boolean) o; } else if (o instanceof Number) { int num = ((Number) o).intValue(); return Boolean.valueOf(num != 0); } else if (o instanceof String) { ... |
Boolean | toBoolean(Object o) to Boolean Boolean toReturn; assertNotNull(o, "Input object cannot be null"); if (o instanceof Boolean) { toReturn = (Boolean) o; } else { toReturn = new Boolean(toString(o)); return toReturn; ... |
Boolean | toBoolean(Object o) to Boolean Boolean b; if (o instanceof Boolean) { b = (Boolean) o; } else { String s = o.toString(); if (s.equalsIgnoreCase("true")) { b = Boolean.TRUE; } else if (s.equalsIgnoreCase("false")) { ... |
boolean | toBoolean(Object obj) to Boolean return toBoolean(obj, false);
|
Boolean | toBoolean(Object obj) to Boolean if (obj == null) { throw new IllegalArgumentException("obj is null"); if (obj instanceof Boolean) { return (Boolean) obj; if (obj instanceof String) { String str = (String) obj; ... |
Boolean | toBoolean(Object obj) to Boolean if (obj == null) { return (Boolean) obj; } else if (obj instanceof Boolean) { return (Boolean) obj; } else if (obj instanceof Number) { final int num = ((Number) obj).intValue(); if (num == 1) { return Boolean.TRUE; ... |
boolean | toBoolean(Object obj) Convert object returned from server to boolean. return (toLong(obj) != 0) ? true : false;
|
Boolean | toBoolean(Object obj) to Boolean if (obj instanceof String) return Boolean.parseBoolean((String) obj); return (Boolean) obj; |
boolean | toBoolean(Object obj) to Boolean return Boolean.valueOf(toString(obj).trim()).booleanValue();
|
boolean | toBoolean(Object obj) Get the boolean value of this object, only if the object is an instance of Boolean return (obj instanceof Boolean) ? ((Boolean) obj).booleanValue() : false; |