Java Boolean to Int convertBooleanToInt(boolean aValue)

Here you can find the source of convertBooleanToInt(boolean aValue)

Description

Convert boolean to TRUE constant.

License

Open Source License

Parameter

Parameter Description
aValue a parameter

Declaration

public static int convertBooleanToInt(boolean aValue) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from w w w .j  a v a 2 s .  c o  m*/
     * Constant for true int (1).
     */
    public static final int TRUE = 1;
    /**
     * Constant for true int (0).
     */
    public static final int FALSE = 0;

    /**
     * Convert boolean to TRUE constant.
     *
     * @param aValue
     */
    public static int convertBooleanToInt(boolean aValue) {
        return aValue ? TRUE : FALSE;
    }
}

Related

  1. boolToInt(boolean b)
  2. boolToInt(boolean b)
  3. boolToInt(boolean bool)
  4. BoolToInt(boolean Expression)
  5. boolToInt(Boolean[] bools_in)
  6. convertBooleanToInt(boolean bool)
  7. convertBooleanToInteger(Boolean booleanToConvert)