public abstract class BitMaskTextProp extends TextProp
Modifier and Type | Field and Description |
---|---|
protected static org.apache.logging.log4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
BitMaskTextProp(BitMaskTextProp other) |
protected |
BitMaskTextProp(int sizeOfDataBlock,
int maskInHeader,
java.lang.String overallName,
java.lang.String... subPropNames) |
Modifier and Type | Method and Description |
---|---|
BitMaskTextProp |
cloneAll() |
abstract BitMaskTextProp |
copy()
Clone, eg when you want to actually make use of one of these.
|
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
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.
|
equals, getMask, getName, getSize, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getGenericChildren, getGenericRecordType
protected BitMaskTextProp(BitMaskTextProp other)
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)
public boolean getSubValue(int idx)
public void setSubValue(boolean value, int idx)
public BitMaskTextProp cloneAll()
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface GenericRecord
getGenericProperties
in class TextProp
public abstract BitMaskTextProp copy()
TextProp
copy
in interface Duplicatable
copy
in class TextProp
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.