public final class BitSetUtils extends Object
short flags; // or int, long, byte public boolean isFooBar() { return BitSetUtils.get(flags, FOOBAR_INDEX); } public void setFooBar(boolean foobar) { flags = BitSetUtils.set(flags, FOOBAR_INDEX, foobar); }
Constructor and Description |
---|
BitSetUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
get(byte bitset,
int index) |
static boolean |
get(int bitset,
int index) |
static boolean |
get(long bitset,
int index) |
static boolean |
get(short bitset,
int index) |
static byte |
set(byte bitset,
int index,
boolean value) |
static int |
set(int bitset,
int index,
boolean value) |
static long |
set(long bitset,
int index,
boolean value) |
static short |
set(short bitset,
int index,
boolean value) |
public static final boolean get(byte bitset, int index)
public static final byte set(byte bitset, int index, boolean value)
public static final boolean get(short bitset, int index)
public static final short set(short bitset, int index, boolean value)
public static final boolean get(int bitset, int index)
public static final int set(int bitset, int index, boolean value)
public static final boolean get(long bitset, int index)
public static final long set(long bitset, int index, boolean value)
Copyright © 2019. All rights reserved.