Top Description Fields Constructors Methods
com.ibm.icu.text

pack-priv Class AbsoluteValueSubstitution

Located in compilation unit of com.ibm.icu.text.NFSubstitution.

extends NFSubstitution
Class Inheritance

A substitution that formats the absolute value of the number. This substitution is represented by >> in a negative-number rule.

Field Summary

Inherited from com.ibm.icu.text.NFSubstitution:
numberFormatposruleSet

Constructor Summary

AccessConstructor and Description
pack-priv
AbsoluteValueSubstitution(int pos, NFRuleSet ruleSet, String description)

Constructs an AbsoluteValueSubstitution.

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

Double.MAX_VALUE
calcUpperBound
(double
Ignored.
oldUpperBound
)

Implements abstract com.ibm.icu.text.NFSubstitution.calcUpperBound.

Sets the upper bound beck up to consider all rules
public double

Returns:

-newRuleValue
composeRuleValue
(double
The result of parsing the substitution
newRuleValue
,
double
The partial parse result prior to calling this function
oldRuleValue
)

Implements abstract com.ibm.icu.text.NFSubstitution.composeRuleValue.

Returns the additive inverse of the result of parsing the substitution (this supersedes the earlier partial result)
pack-priv char

Returns:

'>'
tokenChar
()

Implements abstract com.ibm.icu.text.NFSubstitution.tokenChar.

The token character for an AbsoluteValueSubstitution is >
public long

Returns:

abs(number)
transformNumber
(long
The number being formatted.
number
)

Implements abstract com.ibm.icu.text.NFSubstitution.transformNumber.

Returns the absolute value of the number.
public double

Returns:

abs(number)
transformNumber
(double
The number being formatted.
number
)

Implements abstract com.ibm.icu.text.NFSubstitution.transformNumber.

Returns the absolute value of the number.
Inherited from com.ibm.icu.text.NFSubstitution:
doParsedoSubstitutiondoSubstitutionequalsgetPoshashCodeisModulusSubstitutionmakeSubstitutionsetDecimalFormatSymbolssetDivisortoString

Constructor Detail

AbsoluteValueSubstitutionback to summary
pack-priv AbsoluteValueSubstitution(int pos, NFRuleSet ruleSet, String description)

Constructs an AbsoluteValueSubstitution. This just uses the superclass constructor.

Method Detail

calcUpperBoundback to summary
public double calcUpperBound(double oldUpperBound)

Implements abstract com.ibm.icu.text.NFSubstitution.calcUpperBound.

Sets the upper bound beck up to consider all rules

Parameters
oldUpperBound:double

Ignored.

Returns:double

Double.MAX_VALUE

Annotations
@Override
composeRuleValueback to summary
public double composeRuleValue(double newRuleValue, double oldRuleValue)

Implements abstract com.ibm.icu.text.NFSubstitution.composeRuleValue.

Returns the additive inverse of the result of parsing the substitution (this supersedes the earlier partial result)

Parameters
newRuleValue:double

The result of parsing the substitution

oldRuleValue:double

The partial parse result prior to calling this function

Returns:double

-newRuleValue

Annotations
@Override
tokenCharback to summary
pack-priv char tokenChar()

Implements abstract com.ibm.icu.text.NFSubstitution.tokenChar.

The token character for an AbsoluteValueSubstitution is >

Returns:char

'>'

Annotations
@Override
transformNumberback to summary
public long transformNumber(long number)

Implements abstract com.ibm.icu.text.NFSubstitution.transformNumber.

Returns the absolute value of the number.

Parameters
number:long

The number being formatted.

Returns:long

abs(number)

Annotations
@Override
transformNumberback to summary
public double transformNumber(double number)

Implements abstract com.ibm.icu.text.NFSubstitution.transformNumber.

Returns the absolute value of the number.

Parameters
number:double

The number being formatted.

Returns:double

abs(number)

Annotations
@Override