Here you can find the source of toBoolean(Number value)
public static boolean toBoolean(Number value)
//package com.java2s; //License from project: Apache License public class Main { public static boolean toBoolean(Number value) { return value.intValue() != 0; }//from ww w . j av a 2 s . c o m }