Java Boolean From toBoolean(Number value)

Here you can find the source of toBoolean(Number value)

Description

to Boolean

License

Apache License

Declaration

public static boolean toBoolean(Number value) 

Method Source Code

//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
}

Related

  1. toBoolean(final String value)
  2. toBoolean(final String value, final boolean def)
  3. toBoolean(int i)
  4. toBoolean(int value)
  5. toBoolean(Integer value, Integer trueValue, Integer falseValue)
  6. toBoolean(Object anObj)
  7. toBoolean(Object bool)
  8. toBoolean(Object o)
  9. toBoolean(Object o)