public interface NumberBaseBuilder extends org.refcodes.mixin.CharSetAccessor.CharSetProperty, org.refcodes.mixin.CharSetAccessor.CharSetBuilder<NumberBaseBuilder>
withNumberBase(int)
or setNumberBase(int)
and you can convert forth and back with
toNumberBaseValue(long)
or toNumber(String)
.org.refcodes.mixin.CharSetAccessor.CharSetBuilder<B extends org.refcodes.mixin.CharSetAccessor.CharSetBuilder<B>>, org.refcodes.mixin.CharSetAccessor.CharSetMutator, org.refcodes.mixin.CharSetAccessor.CharSetProperty
Modifier and Type | Method and Description |
---|---|
long |
getNumber()
Retrieves the number from the number property.
|
String |
getNumberBaseValue()
Retrieves the number base value from the number base value property.
|
byte[] |
getNumberData()
Retrieves the number from the number property.
|
void |
setNumber(long aNumber)
Sets the number for the number property.
|
void |
setNumberBase(int aNumberBase)
Sets the number base for the number base property.
|
void |
setNumberBaseValue(String aNumberBaseValue)
Sets the number base value for the number base value property.
|
void |
setNumberData(byte[] aNumberData)
Sets the number for the number property.
|
long |
toNumber(String aNumberBaseValue)
Retrieves the number calculated from the provided number base value.
|
String |
toNumberBaseValue(byte[] aNumberData)
Retrieves the number base value calculated from the number.
|
String |
toNumberBaseValue(long aNumber)
Retrieves the number base value calculated from the number.
|
byte[] |
toNumberData(String aNumberBaseValue)
Retrieves the number calculated from the provided number base value.
|
default NumberBaseBuilder |
withNumber(long aNumber)
Sets the number for the number property.
|
default NumberBaseBuilder |
withNumberBase(int aNumberBase)
Sets the number base for the number base property.
|
default NumberBaseBuilder |
withNumberBaseValue(String aNumberBaseValue)
Sets the number base value for the number base value property.
|
default NumberBaseBuilder |
withNumberData(byte[] aNumberData)
Sets the number for the number property.
|
default NumberBaseBuilder withNumberBase(int aNumberBase)
aNumberBase
- The number base to be stored by the number base
property.void setNumberBase(int aNumberBase)
aNumberBase
- The number base to be stored by the number base
property.String getNumberBaseValue()
String toNumberBaseValue(byte[] aNumberData)
BaseCodecMetrics
via withNumberBase(int)
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 withNumberData(byte[])
with getNumberBaseValue()
aNumberData
- The number to be encoded.String toNumberBaseValue(long aNumber)
BaseCodecMetrics
via withNumberBase(int)
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 withNumberData(byte[])
with getNumberBaseValue()
aNumber
- The number to be encoded.void setNumberBaseValue(String aNumberBaseValue)
aNumberBaseValue
- The number base value to be stored by the number
base value property.default NumberBaseBuilder withNumberBaseValue(String aNumberBaseValue)
aNumberBaseValue
- The number base value to be stored by the number
base value property.long getNumber()
byte[] getNumberData()
long toNumber(String aNumberBaseValue) throws IllegalArgumentException
BaseCodecMetrics
via
withNumberBase(int)
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 withNumberBaseValue(String)
with getNumberData()
.aNumberBaseValue
- The number base value to be decoded.IllegalArgumentException
byte[] toNumberData(String aNumberBaseValue) throws NumberFormatException
BaseCodecMetrics
via
withNumberBase(int)
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 withNumberBaseValue(String)
with getNumberData()
.aNumberBaseValue
- The number base value to be decoded.NumberFormatException
void setNumberData(byte[] aNumberData)
aNumberData
- The number to be stored by the number property.void setNumber(long aNumber)
aNumber
- The number to be stored by the number property.default NumberBaseBuilder withNumberData(byte[] aNumberData)
aNumberData
- The number to be stored by the number property.default NumberBaseBuilder withNumber(long aNumber)
aNumber
- The number to be stored by the number property.Copyright © 2016. All rights reserved.