Java Boolean Convert to booleanToDouble(boolean b)

Here you can find the source of booleanToDouble(boolean b)

Description

boolean To Double

License

LGPL

Declaration

public static double booleanToDouble(boolean b) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static double booleanToDouble(boolean b) {
        return b ? 1. : 0.;
    }//from   w  w w.j av a 2s. c o  m
}

Related

  1. booleanArrayToIntIndexes(boolean[] arrb)
  2. booleanArrayToString(boolean[] array)
  3. booleanArrayToString(boolean[] b, String delim)
  4. booleanArrayToString(boolean[] ba)
  5. booleanToBasicType(boolean b, Class clazz)
  6. booleanToStr(boolean bool)
  7. booleanToTinyInt(boolean b)
  8. booleanToYesNo(Boolean b)
  9. boolToNum(Boolean bool)