Java Boolean to Short booleanToShort(boolean b)

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

Description

boolean To Short

License

LGPL

Declaration

public static short booleanToShort(boolean b) 

Method Source Code

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

public class Main {
    public static short booleanToShort(boolean b) {
        return b ? (short) 1 : 0;
    }//from ww  w.  j  a  va2s  .  c  o  m
}

Related

  1. boolean2Short(boolean pBool)
  2. booleanToShort(boolean[] values)
  3. booleanToshort(final boolean value)