Java Boolean to Long booleanToLong(boolean b)

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

Description

boolean To Long

License

LGPL

Declaration

public static long booleanToLong(boolean b) 

Method Source Code

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

public class Main {
    public static long booleanToLong(boolean b) {
        return b ? 1L : 0L;
    }//from w  w w  .ja v a2  s  .  co m
}

Related

  1. booleanToLong(boolean[] values)
  2. booleanTolong(final boolean value)