java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.base.Flags |
Bit flags object. Integer based (allow 32 bit flags).
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Flags()
Create flags with the initial value 0.
| |||||||||||
Flags(int initial)
Create flags.
| |||||||||||
Flags(int initial, int allowed, Map<Integer, String> names)
Create flags and specify which bits (0..31) are legal parts of the flags.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
addTo(int f)
Add (set) bits to the current flags.
| ||||||||||
int |
get()
Get the current flags.
| ||||||||||
boolean |
has(int f)
Determine if all of the provided bits are currently set.
| ||||||||||
boolean |
hasNone(int f)
Determine if none of the provided bits are currently set.
| ||||||||||
boolean |
hasSome(int f)
Determine if some of the provided bits are currently set.
| ||||||||||
boolean | isValidBit(int bit) | ||||||||||
boolean |
removeFrom(int f)
Remove (reset) bits from the current flags.
| ||||||||||
boolean |
set(int flags)
Set the flags.
| ||||||||||
boolean | testBit(int bit) | ||||||||||
String | toString() | ||||||||||
boolean |
update(int f, boolean add)
Add or remove bits to the current flags.
| ||||||||||
void | verify(int f) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Create flags with the initial value 0.
Create flags.
initial | initial flags value |
---|
Create flags and specify which bits (0..31) are legal parts of the flags.
initial | initial flags value |
---|---|
allowed | legal bit flags; 0xFFFFFFFF (-1) means all bits are legal and can be accessed |
names | optional bit names |
Add (set) bits to the current flags.
Get the current flags.
Determine if all of the provided bits are currently set.
Determine if none of the provided bits are currently set.
Determine if some of the provided bits are currently set.
Remove (reset) bits from the current flags.
Set the flags.
Add or remove bits to the current flags.
add | true to add flags, false to remove flags |
---|