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