Here you can find the source of unsetFlag(final int data, final int flag)
Parameter | Description |
---|---|
data | Data to remove flag from. |
flag | Flag to remove. |
public static int unsetFlag(final int data, final int flag)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w w w . j a v a2 s .com*/ * Unsets a flag. * E.G. * - Flag: 000101 * - Mask: 100101 * - The 4th and 6th bit will be unset, the 1st bit is maintained. * * @param data Data to remove flag from. * @param flag Flag to remove. * @return Data with flag unset. */ public static int unsetFlag(final int data, final int flag) { return data & ~flag; } }