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

pack-priv Class SameValueSubstitution

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

extends NFSubstitution
Class Inheritance

A substitution that passes the value passed to it through unchanged. Represented by == in rule descriptions.

Field Summary

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

Constructor Summary

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

Constructs a SameValueSubstution.

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

oldUpperBound
calcUpperBound
(double
The current upper bound.
oldUpperBound
)

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

SameValueSubstitution doesn't change the upper bound.
public double

Returns:

newRuleValue
composeRuleValue
(double
The value resulting from matching the substitution
newRuleValue
,
double
The value of the rule containing the substitution.
oldRuleValue
)

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

Returns newRuleValue and ignores oldRuleValue.
pack-priv char

Returns:

'='
tokenChar
()

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

The token character for a SameValueSubstitution is =.
public long

Returns:

"number"
transformNumber
(long
The number being formatted
number
)

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

Returns "number" unchanged.
public double

Returns:

"number"
transformNumber
(double
The number being formatted
number
)

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

Returns "number" unchanged.
Inherited from com.ibm.icu.text.NFSubstitution:
doParsedoSubstitutiondoSubstitutionequalsgetPoshashCodeisModulusSubstitutionmakeSubstitutionsetDecimalFormatSymbolssetDivisortoString

Constructor Detail

SameValueSubstitutionback to summary
pack-priv SameValueSubstitution(int pos, NFRuleSet ruleSet, String description)

Constructs a SameValueSubstution. This function just uses the superclass constructor, but it performs a check that this substitution doesn't call the rule set that owns it, since that would lead to infinite recursion.

Method Detail

calcUpperBoundback to summary
public double calcUpperBound(double oldUpperBound)

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

SameValueSubstitution doesn't change the upper bound.

Parameters
oldUpperBound:double

The current upper bound.

Returns:double

oldUpperBound

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

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

Returns newRuleValue and ignores oldRuleValue. (The value we got matching the substitution supersedes the value of the rule that owns the substitution.)

Parameters
newRuleValue:double

The value resulting from matching the substitution

oldRuleValue:double

The value of the rule containing the substitution.

Returns:double

newRuleValue

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

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

The token character for a SameValueSubstitution is =.

Returns:char

'='

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

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

Returns "number" unchanged.

Parameters
number:long

Doc from com.ibm.icu.text.NFSubstitution.transformNumber.

The number being formatted

Returns:long

"number"

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

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

Returns "number" unchanged.

Parameters
number:double

Doc from com.ibm.icu.text.NFSubstitution.transformNumber.

The number being formatted

Returns:double

"number"

Annotations
@Override