Java Boolean From toBooleanObject(final int val)

Here you can find the source of toBooleanObject(final int val)

Description

Method to convert int to Boolean object

License

Open Source License

Parameter

Parameter Description
val a parameter

Declaration

public static Boolean toBooleanObject(final int val) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//w ww  . j  a  va 2s. co  m
     * Method to convert int to Boolean object
     * 
     * @param val
     * @return {@link Boolean}
     */
    public static Boolean toBooleanObject(final int val) {
        return val != 0 ? Boolean.TRUE : Boolean.FALSE;
    }
}

Related

  1. toBooleanArray(final Object[] array)
  2. toBooleanArray(int[] intArray, int n)
  3. toBooleanArray(Object[] vs)
  4. toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)
  5. toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)
  6. toBooleanObject(final String str)
  7. toBooleanObject(int value, int trueValue, int falseValue, int nullValue)
  8. toBooleanObject(int value, int trueValue, int falseValue, int nullValue)
  9. toBooleanObject(String str)