# Class: com.pnfsoftware.jeb.util.base.Flags

Bit flags object, `int` based \(allow 32 bit flags\).

## Constructor: Flags

Description: Create flags with the initial value 0.

## Constructor: Flags
- parameter: `initial`, type: `int`

Description: Create flags.
parameter: initial: initial flags value

## Constructor: Flags
- parameter: `initial`, type: `int`
- parameter: `allowed`, type: `int`
- parameter: `names`, type: `java.util.Map<java.lang.Integer,java.lang.String>`

Description: Create flags and specify which bits \(0..31\) are legal parts of the flags.
parameter: initial: initial flags value
parameter: allowed: legal bit flags; 0xFFFFFFFF \(\-1\) means all bits are legal and can be accessed
parameter: names: optional bit names

## Method: addTo
- parameter: `f`, type: `int`
- return type: `boolean`

Description: Add \(set\) bits to the current flags.
parameter: f: 
return: true if the overall flags have changed, false otherwise

## Method: get
- return type: `int`

Description: Get the current flags.
return: 

## Method: has
- parameter: `f`, type: `int`
- return type: `boolean`

Description: Determine if all of the provided bits are currently set.
parameter: f: 
return: 

## Method: hasNone
- parameter: `f`, type: `int`
- return type: `boolean`

Description: Determine if none of the provided bits are currently set.
parameter: f: 
return: 

## Method: hasSome
- parameter: `f`, type: `int`
- return type: `boolean`

Description: Determine if some of the provided bits are currently set.
parameter: f: 
return: 

## Method: isValidBit
- parameter: `bit`, type: `int`
- return type: `boolean`


## Method: removeFrom
- parameter: `f`, type: `int`
- return type: `boolean`

Description: Remove \(reset\) bits from the current flags.
parameter: f: 
return: true if the overall flags have changed, false otherwise

## Method: set
- parameter: `flags`, type: `int`
- return type: `boolean`

Description: Set the flags.
parameter: flags: 
return: true if the flags have changed, false otherwise

## Method: testBit
- parameter: `bit`, type: `int`
- return type: `boolean`


## Method: toString
- return type: `java.lang.String`


## Method: update
- parameter: `f`, type: `int`
- parameter: `add`, type: `boolean`
- return type: `boolean`

Description: Add or remove bits to the current flags.
parameter: f: 
parameter: add: true to add flags, false to remove flags
return: true if the overall flags have changed, false otherwise

## Method: verify
- parameter: `f`, type: `int`


## Static Method: has
- parameter: `flags`, type: `int`
- parameter: `bits`, type: `int`
- return type: `boolean`

Description: Flags utility: determine if the provided bit\(s\) is/are set
parameter: flags: current flags
parameter: bits: bits to check
return: true if the provided bits are all set, false otherwise

## Static Method: set
- parameter: `flags`, type: `int`
- parameter: `bits`, type: `int`
- parameter: `enabled`, type: `boolean`
- return type: `int`

Description: Flags utility: set or reset bits.
parameter: flags: current flags
parameter: bits: bit\(s\) to set or reset
parameter: enabled: true to set, false to reset
return: updated flags

