Deprecated
as a consequence of DecimalQuantity_AbstractBCD being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | bcdBytes
The BCD of the 16 digits of the number represented by this object. |
| private long | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| public | DecimalQuantity_DualStorageBCD(DecimalQuantity_DualStorageBCD other)
Deprecated
as a consequence of
DecimalQuantity_DualStorageBCD being deprecated.
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected BigDecimal | bcdToBigDecimal()
Implements abstract com. |
| public String | Returns: An error message if this instance is invalid, or null if this instance is healthy.
Deprecated
This API is for ICU internal use only.
Checks whether the bytes stored in this instance are all valid.
|
| protected void | compact()
Implements abstract com. |
| protected void | copyBcdFrom(DecimalQuantity _other)
Implements abstract com.
Deprecated
as a consequence of
DecimalQuantity being deprecated.
|
| public DecimalQuantity | createCopy()
Implements com.
Deprecated
as a consequence of
Like clone, but without the restrictions of the Cloneable interface clone.
DecimalQuantity being deprecated.
|
| private void | |
| private void | |
| public static DecimalQuantity | fromExponentString(String
The String to parse num)
Deprecated
as a consequence of
Returns a DecimalQuantity after parsing the input string.
DecimalQuantity being deprecated.
|
| protected byte | getDigitPos(int
The position of the digit to pop, counted in BCD units from the least significant
digit. If outside the range supported by the implementation, zero is returned. position)Implements abstract com. |
| private static int | |
| public boolean | Returns: true if an internal byte array is being used; false if a long is being used.
Deprecated
This API is ICU internal only.
Checks whether this DecimalQuantity_DualStorageBCD is using its internal byte array
storage mechanism.
|
| public int | |
| protected void | popFromLeft(int numDigits)
Implements abstract com. |
| protected void | readBigIntegerToBcd(BigInteger
The value to consume. n)Implements abstract com. |
| protected void | readIntToBcd(int
The value to consume. n)Implements abstract com. |
| protected void | readLongToBcd(long
The value to consume. n)Implements abstract com. |
| protected void | setBcdToZero()
Implements abstract com. |
| protected void | setDigitPos(int
The position of the digit to pop, counted in BCD units from the least significant
digit. If outside the range supported by the implementation, an AssertionError is
thrown. position, byte The digit to set at the specified location. value)Implements abstract com. |
| protected void | shiftLeft(int
The number of zeros to add. numDigits)Implements abstract com. |
| protected void | shiftRight(int
The number of digits to remove. numDigits)Implements abstract com. |
| private void | |
| private String | |
| public String |
| bcdBytes | back to summary |
|---|---|
| private byte[] bcdBytes The BCD of the 16 digits of the number represented by this object. Every 4 bits of the long map to one digit. For example, the number "12345" in BCD is "0x12345".
Whenever bcd changes internally, | |
| bcdLong | back to summary |
|---|---|
| private long bcdLong | |
| usingBytes | back to summary |
|---|---|
| private boolean usingBytes | |
| DecimalQuantity_DualStorageBCD | back to summary |
|---|---|
| public DecimalQuantity_DualStorageBCD() | |
| DecimalQuantity_DualStorageBCD | back to summary |
|---|---|
| public DecimalQuantity_DualStorageBCD(long input) | |
| DecimalQuantity_DualStorageBCD | back to summary |
|---|---|
| public DecimalQuantity_DualStorageBCD(int input) | |
| DecimalQuantity_DualStorageBCD | back to summary |
|---|---|
| public DecimalQuantity_DualStorageBCD(double input) | |
| DecimalQuantity_DualStorageBCD | back to summary |
|---|---|
| public DecimalQuantity_DualStorageBCD(BigInteger input) | |
| DecimalQuantity_DualStorageBCD | back to summary |
|---|---|
| public DecimalQuantity_DualStorageBCD(BigDecimal input) | |
| DecimalQuantity_DualStorageBCD | back to summary |
|---|---|
| public DecimalQuantity_DualStorageBCD(DecimalQuantity_DualStorageBCD other)
Deprecated as a consequence of | |
| DecimalQuantity_DualStorageBCD | back to summary |
|---|---|
| public DecimalQuantity_DualStorageBCD(Number number) | |
| bcdToBigDecimal | back to summary |
|---|---|
| protected BigDecimal bcdToBigDecimal() Implements abstract com. Doc from com. Returns a BigDecimal encoding the internal BCD value.
| |
| checkHealth | back to summary |
|---|---|
| public String checkHealth()
Deprecated This API is for ICU internal use only. Checks whether the bytes stored in this instance are all valid. For internal unit testing only. | |
| compact | back to summary |
|---|---|
| protected void compact() Implements abstract com. Doc from com. Removes trailing zeros from the BCD (adjusting the scale as required) and then computes the precision. The precision is the number of digits in the number up through the greatest nonzero digit.
This method must always be called when bcd changes in order for assumptions to be correct in
methods like
| |
| copyBcdFrom | back to summary |
|---|---|
| protected void copyBcdFrom(DecimalQuantity _other) Implements abstract com. Deprecated as a consequence of
| |
| createCopy | back to summary |
|---|---|
| public DecimalQuantity createCopy() Implements com. Doc from com. Deprecated as a consequence of Like clone, but without the restrictions of the Cloneable interface clone.
| |
| ensureCapacity | back to summary |
|---|---|
| private void ensureCapacity() Ensure that a byte array of at least 40 digits is allocated. | |
| ensureCapacity | back to summary |
|---|---|
| private void ensureCapacity(int capacity) | |
| fromExponentString | back to summary |
|---|---|
| public static DecimalQuantity fromExponentString(String num)
Deprecated as a consequence of Returns a DecimalQuantity after parsing the input string.
| |
| getDigitPos | back to summary |
|---|---|
| protected byte getDigitPos(int position) Implements abstract com. Doc from com. Returns a single digit from the BCD list. No internal state is changed by calling this method.
| |
| getVisibleFractionCount | back to summary |
|---|---|
| private static int getVisibleFractionCount(String value) | |
| isUsingBytes | back to summary |
|---|---|
| public boolean isUsingBytes()
Deprecated This API is ICU internal only. Checks whether this
| |
| maxRepresentableDigits | back to summary |
|---|---|
| public int maxRepresentableDigits() Implements com.
| |
| popFromLeft | back to summary |
|---|---|
| protected void popFromLeft(int numDigits) Implements abstract com. Doc from com. Directly removes digits from the front of the BCD list. Updates precision. Caution it is the caller's responsibility to call
| |
| readBigIntegerToBcd | back to summary |
|---|---|
| protected void readBigIntegerToBcd(BigInteger n) Implements abstract com. Doc from com. Sets the internal BCD state to represent the value in the given BigInteger. The BigInteger is guaranteed to be positive, and it is guaranteed to be larger than Long.MAX_VALUE. The internal state is guaranteed to be empty when this method is called.
| |
| readIntToBcd | back to summary |
|---|---|
| protected void readIntToBcd(int n) Implements abstract com. Doc from com. Sets the internal BCD state to represent the value in the given int. The int is guaranteed to be either positive. The internal state is guaranteed to be empty when this method is called.
| |
| readLongToBcd | back to summary |
|---|---|
| protected void readLongToBcd(long n) Implements abstract com. Doc from com. Sets the internal BCD state to represent the value in the given long. The long is guaranteed to be either positive. The internal state is guaranteed to be empty when this method is called.
| |
| setBcdToZero | back to summary |
|---|---|
| protected void setBcdToZero() Implements abstract com. Doc from com. Sets the internal representation to zero. Clears any values stored in scale, precision, hasDouble, origDouble, origDelta, exponent, and BCD data.
| |
| setDigitPos | back to summary |
|---|---|
| protected void setDigitPos(int position, byte value) Implements abstract com. Doc from com. Sets the digit in the BCD list. This method only sets the digit; it is the caller's
responsibility to call
| |
| shiftLeft | back to summary |
|---|---|
| protected void shiftLeft(int numDigits) Implements abstract com. Doc from com. Adds zeros to the end of the BCD list. This will result in an invalid BCD representation; it is
the caller's responsibility to do further manipulation and then call
| |
| shiftRight | back to summary |
|---|---|
| protected void shiftRight(int numDigits) Implements abstract com. Doc from com. Removes digits from the end of the BCD list. This may result in an invalid BCD representation; it
is the caller's responsibility to follow-up with a call to
| |
| switchStorage | back to summary |
|---|---|
| private void switchStorage() Switches the internal storage mechanism between the 64-bit long and the byte array. | |
| toNumberString | back to summary |
|---|---|
| private String toNumberString() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |