Here you can find the source of unsetBit(long flags, long bit)
Parameter | Description |
---|---|
flags | bitmap to change |
bit | bits to unset |
public static long unsetBit(long flags, long bit)
//package com.java2s; //License from project: Open Source License public class Main { /**//w w w . java 2s . c om * Unset a bit or bit combination from bitmap * @param flags bitmap to change * @param bit bits to unset * @return updated bitmap with specified bits cleared */ public static long unsetBit(long flags, long bit) { return flags & ~bit; } /** * Unset a bit or bit combination from bitmap * @param flags bitmap to change * @param bit bits to unset * @return updated bitmap with specified bits cleared */ public static int unsetBit(int flags, int bit) { return flags & ~bit; } }