public class Flags
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
Flags()
Prevents this class from being instantiated from outside.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
change(int flags,
int mask,
boolean set)
Turns the given mask on or off in
flags. |
static boolean |
isSet(int flags,
int mask)
Returns if the given mask is set in
flags. |
static int |
set(int flags,
int mask)
Turns the given mask on in
flags. |
static int |
unset(int flags,
int mask)
Turns the given mask off in
flags. |
private Flags()
public static final boolean isSet(int flags,
int mask)
flags.flags - the current flagsmask - the mask to checktrue if mask is set in
flags, false elsepublic static final int set(int flags,
int mask)
flags.flags - the current flagsmask - the mask to setpublic static final int unset(int flags,
int mask)
flags.flags - the current flagsmask - the mask to clearpublic static final int change(int flags,
int mask,
boolean set)
flags.flags - the current flagsmask - the mask to clearset - if true call set(int, int)
else unset(int, int).