|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.util.BitField
@Internal(since="POI 3.15 beta 3") public class BitField
Manage operations dealing with bit-mapped fields.
Constructor Summary | |
---|---|
BitField(int mask)
Create a BitField instance |
Method Summary | |
---|---|
int |
clear(int holder)
Clear the bits. |
byte |
clearByte(byte holder)
Clear the bits. |
short |
clearShort(short holder)
Clear the bits. |
int |
getRawValue(int holder)
Obtain the value for the specified BitField, unshifted |
short |
getShortRawValue(short holder)
Obtain the value for the specified BitField, unshifted |
short |
getShortValue(short holder)
Obtain the value for the specified BitField, appropriately shifted right, as a short. |
int |
getValue(int holder)
Obtain the value for the specified BitField, appropriately shifted right. |
boolean |
isAllSet(int holder)
Are all of the bits set or not? This is a stricter test than isSet, in that all of the bits in a multi-bit set must be set for this method to return true |
boolean |
isSet(int holder)
Is the field set or not? This is most commonly used for a single-bit field, which is often used to represent a boolean value; the results of using it for a multi-bit field is to determine whether *any* of its bits are set |
int |
set(int holder)
Set the bits. |
int |
setBoolean(int holder,
boolean flag)
Set a boolean BitField |
byte |
setByte(byte holder)
Set the bits. |
byte |
setByteBoolean(byte holder,
boolean flag)
Set a boolean BitField |
short |
setShort(short holder)
Set the bits. |
short |
setShortBoolean(short holder,
boolean flag)
Set a boolean BitField |
short |
setShortValue(short holder,
short value)
Replace the bits with new values. |
int |
setValue(int holder,
int value)
Replace the bits with new values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitField(int mask)
mask
- the mask specifying which bits apply to this
BitField. Bits that are set in this mask are the
bits that this BitField operates onMethod Detail |
---|
public int getValue(int holder)
holder
- the int data containing the bits we're interested
in
public short getShortValue(short holder)
holder
- the short data containing the bits we're
interested in
public int getRawValue(int holder)
holder
- the int data containing the bits we're interested
in
public short getShortRawValue(short holder)
holder
- the short data containing the bits we're
interested in
public boolean isSet(int holder)
holder
- the int data containing the bits we're interested in
public boolean isAllSet(int holder)
holder
- the int data containing the bits we're interested in
public int setValue(int holder, int value)
holder
- the int data containing the bits we're interested invalue
- the new value for the specified bits
public short setShortValue(short holder, short value)
holder
- the short data containing the bits we're interested invalue
- the new value for the specified bits
public int clear(int holder)
holder
- the int data containing the bits we're interested in
public short clearShort(short holder)
holder
- the short data containing the bits we're
interested in
public byte clearByte(byte holder)
holder
- the byte data containing the bits we're
interested in
public int set(int holder)
holder
- the int data containing the bits we're interested
in
public short setShort(short holder)
holder
- the short data containing the bits we're
interested in
public byte setByte(byte holder)
holder
- the byte data containing the bits we're
interested in
public int setBoolean(int holder, boolean flag)
holder
- the int data containing the bits we're interested
inflag
- indicating whether to set or clear the bits
public short setShortBoolean(short holder, boolean flag)
holder
- the short data containing the bits we're
interested inflag
- indicating whether to set or clear the bits
public byte setByteBoolean(byte holder, boolean flag)
holder
- the byte data containing the bits we're
interested inflag
- indicating whether to set or clear the bits
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |