Here you can find the source of bitMask(int bit)
Parameter | Description |
---|---|
bit | The bit to be used to calculate the bitmask. |
public static int bitMask(int bit)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w w w . j a va 2 s . com*/ * Calculate a bitmask of the bit. * @param bit The bit to be used to calculate the bitmask. * @return The value of the bitmask. */ public static int bitMask(int bit) { assert bit >= 0 && bit < 16; return 1 << bit; } }