public abstract class AbstractBitFlags extends Object
The concrete value is either provided by an associated PDF object along with the access method to the value within the object or by an independent integer value itself.
| Constructor and Description |
|---|
AbstractBitFlags(COSBasedObject object,
COSName field) |
AbstractBitFlags(int value) |
| Modifier and Type | Method and Description |
|---|---|
int |
getValue()
By implementing this method the subclass provides the integer which
contains the bit flags.
|
boolean |
isSetAnd(int bitMask)
Checks if all the bits set in the bit mask are also set in the underlying
integer.
|
boolean |
isSetOr(int bitMask)
Checks if one of the bits set in the bit mask are also set in the
underlying integer.
|
void |
set(int bitMask,
boolean flag)
All bits in the underlying integer masked by the bit mask are set
acording to the flag.
|
void |
setValue(int newValue)
This method is used to write back the changes made to the bit flags.
|
public AbstractBitFlags(COSBasedObject object, COSName field)
public AbstractBitFlags(int value)
public final int getValue()
public boolean isSetAnd(int bitMask)
bitMask - a integer containing the bit mask to testpublic boolean isSetOr(int bitMask)
bitMask - a integer containing the bit maskpublic void set(int bitMask,
boolean flag)
bitMask - flag - public final void setValue(int newValue)
newValue - the whole integer containing all bit flagsCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.