Java Utililty Methods Boolean to Short

List of utility methods to do Boolean to Short

Description

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

Method

Shortboolean2Short(boolean pBool)
Java boolean in Java Short konvertieren.
return new Short(pBool ? (short) 1 : (short) 0);
shortbooleanToShort(boolean b)
boolean To Short
return b ? (short) 1 : 0;
short[]booleanToShort(boolean[] values)
boolean To Short
if (values == null) {
    return null;
short[] results = new short[values.length];
for (int i = 0; i < values.length; i++) {
    results[i] = (short) (values[i] == true ? 1 : 0);
return results;
...
shortbooleanToshort(final boolean value)
boolean Toshort
return (short) (value ? 1 : 0);