BaseBuilder
, BaseMetricsAccessor
, BaseMetricsAccessor.BaseCodecMetricsProperty
, BaseMetricsAccessor.BaseMetricsBuilder<BaseBuilder>
, BaseMetricsAccessor.BaseMetricsMutator
public class BaseBuilderImpl extends Object implements BaseBuilder
BaseBuilder
interface.BaseMetricsAccessor.BaseCodecMetricsProperty, BaseMetricsAccessor.BaseMetricsBuilder<B extends BaseMetricsAccessor.BaseMetricsBuilder<B>>, BaseMetricsAccessor.BaseMetricsMutator
Constructor | Description |
---|---|
BaseBuilderImpl() |
Modifier and Type | Method | Description |
---|---|---|
BaseMetrics |
getBaseMetrics() |
Retrieves the base codec metrics from the base codec metrics property.
|
byte[] |
getDecodedData() |
Retrieves the decoded data from the decoded data property.
|
String |
getEncodedText() |
Retrieves the encoded text from the encoded text property.
|
void |
setBaseMetrics(BaseMetrics aBaseMetrics) |
Sets the base codec metrics for the base codec metrics property.
|
void |
setDecodedData(byte[] aDecodedData) |
Sets the decoded data for the decoded data property.
|
void |
setDecodedData(long aDecodedData) |
Sets the decoded data for the decoded data property.
|
void |
setEncodedText(String aEncodedText) |
Sets the encoded text for the encoded text property.
|
protected static int |
toBytes(byte[] aDecodedBytes,
int aOffset,
int aWord,
int aTrailingBytes,
BaseMetrics aBaseMetrics) |
To bytes.
|
byte[] |
toDecodedData(String aEncodedText) |
Retrieves the decoded data calculated from the provided encoded text.
|
protected static byte[] |
toDecodedData(String aEncodedText,
BaseMetrics aBaseMetrics) |
To decoded data.
|
protected static int |
toDecodedSize(String aEncodedText,
BaseMetrics aBaseMetrics) |
To decoded size.
|
String |
toEncodedText(byte[] aDecodedData) |
Retrieves the encoded text calculated from the decoded data.
|
protected static String |
toEncodedText(byte[] aDecodedData,
BaseMetrics aBaseMetrics) |
To encoded text.
|
String |
toEncodedText(long aDecodedData) |
Retrieves the encoded text calculated from the decoded data.
|
setBaseMetrics, withBaseMetrics, withBaseMetrics, withDecodedData, withDecodedData, withEncodedText
public BaseMetrics getBaseMetrics()
getBaseMetrics
in interface BaseMetricsAccessor
public void setBaseMetrics(BaseMetrics aBaseMetrics)
setBaseMetrics
in interface BaseMetricsAccessor.BaseMetricsMutator
aBaseMetrics
- The base codec metrics to be stored by the font
style property.public String getEncodedText()
getEncodedText
in interface BaseBuilder
public void setEncodedText(String aEncodedText)
setEncodedText
in interface BaseBuilder
aEncodedText
- The encoded text to be stored by the encoded text
property.public byte[] getDecodedData()
getDecodedData
in interface BaseBuilder
public void setDecodedData(byte[] aDecodedData)
setDecodedData
in interface BaseBuilder
aDecodedData
- The decoded data to be stored by the decoded data
property.public void setDecodedData(long aDecodedData)
setDecodedData
in interface BaseBuilder
aDecodedData
- The decoded data to be stored by the decoded data
property.public String toEncodedText(byte[] aDecodedData)
BaseMetrics
via BaseBuilder.withBaseMetrics(BaseMetrics)
can cause
side effects!
For avoiding thread race conditions / side effects regarding the decoded
data (and the encoded result), use this method instead of the combination
of BaseBuilder.withDecodedData(byte[])
with BaseBuilder.getEncodedText()
toEncodedText
in interface BaseBuilder
aDecodedData
- The decoded data to be encoded.public byte[] toDecodedData(String aEncodedText)
BaseMetrics
via BaseBuilder.withBaseMetrics(BaseMetrics)
can cause
side effects!
For avoiding thread race conditions / side effects regarding the encoded
text (and the decoded result), use this method instead of the combination
of BaseBuilder.withEncodedText(String)
with BaseBuilder.getDecodedData()
.toDecodedData
in interface BaseBuilder
aEncodedText
- The encoded text to be decoded.public String toEncodedText(long aDecodedData)
BaseMetrics
via BaseBuilder.withBaseMetrics(BaseMetrics)
can cause
side effects!
For avoiding thread race conditions / side effects regarding the decoded
data (and the encoded result), use this method instead of the combination
of BaseBuilder.withDecodedData(byte[])
with BaseBuilder.getEncodedText()
toEncodedText
in interface BaseBuilder
aDecodedData
- The decoded data to be encoded.protected static String toEncodedText(byte[] aDecodedData, BaseMetrics aBaseMetrics)
aDecodedData
- the decoded dataaBaseMetrics
- the base metricsprotected static byte[] toDecodedData(String aEncodedText, BaseMetrics aBaseMetrics)
aEncodedText
- the encoded textaBaseMetrics
- the base metricsprotected static int toDecodedSize(String aEncodedText, BaseMetrics aBaseMetrics)
aEncodedText
- the encoded textaBaseMetrics
- the base metricsprotected static int toBytes(byte[] aDecodedBytes, int aOffset, int aWord, int aTrailingBytes, BaseMetrics aBaseMetrics)
aDecodedBytes
- the decoded bytesaOffset
- the offsetaWord
- the wordaTrailingBytes
- the trailing bytesaBaseMetrics
- the base metricsCopyright © 2018. All rights reserved.