public abstract class BitMaskTextProp extends TextProp implements java.lang.Cloneable
Modifier | Constructor and Description |
---|---|
protected |
BitMaskTextProp(int sizeOfDataBlock,
int maskInHeader,
java.lang.String overallName,
java.lang.String... subPropNames) |
Modifier and Type | Method and Description |
---|---|
BitMaskTextProp |
clone()
Clone, eg when you want to actually make use of one of these.
|
BitMaskTextProp |
cloneAll() |
boolean[] |
getSubPropMatches()
Fetch the list of if the sub properties match or not
|
java.lang.String[] |
getSubPropNames()
Fetch the list of the names of the sub properties
|
boolean |
getSubValue(int idx)
Fetch the true/false status of the subproperty with the given index
|
int |
getValue()
Return the text property value.
|
int |
getWriteMask()
Calculate mask from the subPropMatches.
|
void |
setSubValue(boolean value,
int idx)
Set the true/false status of the subproperty with the given index
|
void |
setValue(int val)
Set the value of the text property, and recompute the sub
properties based on it, i.e.
|
void |
setValueWithMask(int val,
int writeMask)
Convenience method to set a value with mask, without splitting it into the subvalues
|
void |
setWriteMask(int writeMask)
Sets the write mask, i.e.
|
protected static final POILogger logger
protected BitMaskTextProp(int sizeOfDataBlock, int maskInHeader, java.lang.String overallName, java.lang.String... subPropNames)
public java.lang.String[] getSubPropNames()
public boolean[] getSubPropMatches()
public int getWriteMask()
getWriteMask
in class TextProp
public void setWriteMask(int writeMask)
writeMask
- the mask, bit values outside the property mask range will be ignoredpublic int getValue()
public void setValue(int val)
setSubValue(boolean, int)
to explicitly set subvalues to false
.public void setValueWithMask(int val, int writeMask)
val
- writeMask
- public boolean getSubValue(int idx)
public void setSubValue(boolean value, int idx)
public BitMaskTextProp clone()
TextProp
public BitMaskTextProp cloneAll()
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.