Java Utililty Methods Boolean to Long

List of utility methods to do Boolean to Long

Description

The list of methods to do Boolean to Long are organized into topic(s).

Method

longbooleanToLong(boolean b)
boolean To Long
return b ? 1L : 0L;
long[]booleanToLong(boolean[] values)
boolean To Long
if (values == null) {
    return null;
long[] results = new long[values.length];
for (int i = 0; i < values.length; i++) {
    results[i] = (values[i] == true ? 1 : 0);
return results;
...
longbooleanTolong(final boolean value)
boolean Tolong
return value ? 1 : 0;