Home
last modified time | relevance | path

Searched refs:singleUnit (Results 1 – 20 of 20) sorted by relevance

/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/units/
DMeasureUnitImpl.java41 public MeasureUnitImpl(SingleUnitImpl singleUnit) { in MeasureUnitImpl() argument
43 this.appendSingleUnit(singleUnit); in MeasureUnitImpl()
70 for (SingleUnitImpl singleUnit : this.singleUnits) { in copy()
71 result.singleUnits.add(singleUnit.copy()); in copy()
86 for (SingleUnitImpl singleUnit : this.getSingleUnits()) { in copyAndSimplify()
91 if(resultSingleUnit.getSimpleUnitID().compareTo(singleUnit.getSimpleUnitID()) == 0 in copyAndSimplify()
93 …resultSingleUnit.getPrefix().getIdentifier().compareTo(singleUnit.getPrefix().getIdentifier()) == 0 in copyAndSimplify()
96 …ultSingleUnit.setDimensionality(resultSingleUnit.getDimensionality() + singleUnit.getDimensionalit… in copyAndSimplify()
102 result.appendSingleUnit(singleUnit); in copyAndSimplify()
121 for (SingleUnitImpl singleUnit : in takeReciprocal()
[all …]
DConversionRates.java41 private UnitsConverter.Factor getFactorToBase(SingleUnitImpl singleUnit) { in getFactorToBase() argument
42 int power = singleUnit.getDimensionality(); in getFactorToBase()
43 MeasureUnit.MeasurePrefix unitPrefix = singleUnit.getPrefix(); in getFactorToBase()
44 …r result = UnitsConverter.Factor.processFactor(mapToConversionRate.get(singleUnit.getSimpleUnitID(… in getFactorToBase()
54 for (SingleUnitImpl singleUnit : in getFactorToBase()
56 result = result.multiply(getFactorToBase(singleUnit)); in getFactorToBase()
95 for (SingleUnitImpl singleUnit : in extractBaseUnits()
97 result.addAll(extractBaseUnits(singleUnit)); in extractBaseUnits()
110 public ArrayList<SingleUnitImpl> extractBaseUnits(SingleUnitImpl singleUnit) { in extractBaseUnits() argument
111 String target = mapToConversionRate.get(singleUnit.getSimpleUnitID()).getTarget(); in extractBaseUnits()
[all …]
DUnitsConverter.java94 for (SingleUnitImpl singleUnit : in insertInMap()
96 if (dimensionMap.containsKey(singleUnit.getSimpleUnitID())) { in insertInMap()
97 …dimensionMap.put(singleUnit.getSimpleUnitID(), dimensionMap.get(singleUnit.getSimpleUnitID()) + si… in insertInMap()
99 … dimensionMap.put(singleUnit.getSimpleUnitID(), singleUnit.getDimensionality() * multiplier); in insertInMap()
/external/icu/android_icu4j/src/main/java/android/icu/impl/units/
DMeasureUnitImpl.java45 public MeasureUnitImpl(SingleUnitImpl singleUnit) { in MeasureUnitImpl() argument
47 this.appendSingleUnit(singleUnit); in MeasureUnitImpl()
74 for (SingleUnitImpl singleUnit : this.singleUnits) { in copy()
75 result.singleUnits.add(singleUnit.copy()); in copy()
90 for (SingleUnitImpl singleUnit : this.getSingleUnits()) { in copyAndSimplify()
95 if(resultSingleUnit.getSimpleUnitID().compareTo(singleUnit.getSimpleUnitID()) == 0 in copyAndSimplify()
97 …resultSingleUnit.getPrefix().getIdentifier().compareTo(singleUnit.getPrefix().getIdentifier()) == 0 in copyAndSimplify()
100 …ultSingleUnit.setDimensionality(resultSingleUnit.getDimensionality() + singleUnit.getDimensionalit… in copyAndSimplify()
106 result.appendSingleUnit(singleUnit); in copyAndSimplify()
125 for (SingleUnitImpl singleUnit : in takeReciprocal()
[all …]
DConversionRates.java45 private UnitsConverter.Factor getFactorToBase(SingleUnitImpl singleUnit) { in getFactorToBase() argument
46 int power = singleUnit.getDimensionality(); in getFactorToBase()
47 MeasureUnit.MeasurePrefix unitPrefix = singleUnit.getPrefix(); in getFactorToBase()
48 …r result = UnitsConverter.Factor.processFactor(mapToConversionRate.get(singleUnit.getSimpleUnitID(… in getFactorToBase()
58 for (SingleUnitImpl singleUnit : in getFactorToBase()
60 result = result.multiply(getFactorToBase(singleUnit)); in getFactorToBase()
99 for (SingleUnitImpl singleUnit : in extractBaseUnits()
101 result.addAll(extractBaseUnits(singleUnit)); in extractBaseUnits()
114 public ArrayList<SingleUnitImpl> extractBaseUnits(SingleUnitImpl singleUnit) { in extractBaseUnits() argument
115 String target = mapToConversionRate.get(singleUnit.getSimpleUnitID()).getTarget(); in extractBaseUnits()
[all …]
DUnitsConverter.java98 for (SingleUnitImpl singleUnit : in insertInMap()
100 if (dimensionMap.containsKey(singleUnit.getSimpleUnitID())) { in insertInMap()
101 …dimensionMap.put(singleUnit.getSimpleUnitID(), dimensionMap.get(singleUnit.getSimpleUnitID()) + si… in insertInMap()
103 … dimensionMap.put(singleUnit.getSimpleUnitID(), singleUnit.getDimensionality() * multiplier); in insertInMap()
/external/icu/icu4c/source/i18n/
Dmeasunit_extra.cpp568 SingleUnitImpl singleUnit = nextSingleUnit(sawAnd, status); in parse() local
573 bool added = result.appendSingleUnit(singleUnit, status); in parse()
997 MeasureUnitImpl::MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status) { in MeasureUnitImpl() argument
998 this->appendSingleUnit(singleUnit, status); in MeasureUnitImpl()
1034 const SingleUnitImpl &singleUnit = *this->singleUnits[i]; in copyAndSimplify() local
1040 … if (uprv_strcmp(result.singleUnits[j]->getSimpleUnitID(), singleUnit.getSimpleUnitID()) == in copyAndSimplify()
1042 result.singleUnits[j]->unitPrefix == singleUnit.unitPrefix) { in copyAndSimplify()
1045 result.singleUnits[j]->dimensionality + singleUnit.dimensionality; in copyAndSimplify()
1051 result.appendSingleUnit(singleUnit, status); in copyAndSimplify()
1058 bool MeasureUnitImpl::appendSingleUnit(const SingleUnitImpl &singleUnit, UErrorCode &status) { in appendSingleUnit() argument
[all …]
Dunits_converter.cpp225 SingleUnitImpl singleUnit = *source.singleUnits[i]; in loadCompoundFactor() local
227 Factor singleFactor = loadSingleFactor(singleUnit.getSimpleUnitID(), ratesInfo, status); in loadCompoundFactor()
233 singleFactor.applyPrefix(singleUnit.unitPrefix); in loadCompoundFactor()
236 singleFactor.power(singleUnit.dimensionality); in loadCompoundFactor()
264 auto singleUnit = *(unit.singleUnits[0]); in checkSimpleUnit() local
266 if (singleUnit.dimensionality != 1 || singleUnit.unitPrefix != UMEASURE_PREFIX_ONE) { in checkSimpleUnit()
322 UnitIndexAndDimension(const SingleUnitImpl &singleUnit, int32_t multiplier) { in UnitIndexAndDimension()
323 index = singleUnit.index; in UnitIndexAndDimension()
324 dimensionality = singleUnit.dimensionality * multiplier; in UnitIndexAndDimension()
344 auto singleUnit = *shouldBeMerged.singleUnits[unit_i]; in mergeUnitsAndDimensions() local
[all …]
Dnumber_longnames.cpp869 const SingleUnitImpl *singleUnit = mui.singleUnits[singleUnitIndex]; in calculateGenderForUnit() local
871 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit()
880 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit()
889 …return getGenderForBuiltin(locale, MeasureUnit::forIdentifier(singleUnit->getSimpleUnitID(), statu… in calculateGenderForUnit()
1174 SingleUnitImpl *singleUnit = productUnit.singleUnits[singleUnitIndex]; in processPatternTimes() local
1192 if (!MeasureUnit::findBySubType(singleUnit->getSimpleUnitID(), &simpleUnit)) { in processPatternTimes()
1204 U_ASSERT(singleUnit->dimensionality > 0); in processPatternTimes()
1205 int32_t dimensionality = singleUnit->dimensionality; in processPatternTimes()
1232 singleUnit->dimensionality = 1; in processPatternTimes()
1236 UMeasurePrefix prefix = singleUnit->unitPrefix; in processPatternTimes()
[all …]
Dmeasunit_impl.h220 MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status);
309 bool appendSingleUnit(const SingleUnitImpl& singleUnit, UErrorCode& status);
/external/cronet/third_party/icu/source/i18n/
Dmeasunit_extra.cpp568 SingleUnitImpl singleUnit = nextSingleUnit(sawAnd, status); in parse() local
573 bool added = result.appendSingleUnit(singleUnit, status); in parse()
997 MeasureUnitImpl::MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status) { in MeasureUnitImpl() argument
998 this->appendSingleUnit(singleUnit, status); in MeasureUnitImpl()
1034 const SingleUnitImpl &singleUnit = *this->singleUnits[i]; in copyAndSimplify() local
1040 … if (uprv_strcmp(result.singleUnits[j]->getSimpleUnitID(), singleUnit.getSimpleUnitID()) == in copyAndSimplify()
1042 result.singleUnits[j]->unitPrefix == singleUnit.unitPrefix) { in copyAndSimplify()
1045 result.singleUnits[j]->dimensionality + singleUnit.dimensionality; in copyAndSimplify()
1051 result.appendSingleUnit(singleUnit, status); in copyAndSimplify()
1058 bool MeasureUnitImpl::appendSingleUnit(const SingleUnitImpl &singleUnit, UErrorCode &status) { in appendSingleUnit() argument
[all …]
Dunits_converter.cpp225 SingleUnitImpl singleUnit = *source.singleUnits[i]; in loadCompoundFactor() local
227 Factor singleFactor = loadSingleFactor(singleUnit.getSimpleUnitID(), ratesInfo, status); in loadCompoundFactor()
233 singleFactor.applyPrefix(singleUnit.unitPrefix); in loadCompoundFactor()
236 singleFactor.power(singleUnit.dimensionality); in loadCompoundFactor()
264 auto singleUnit = *(unit.singleUnits[0]); in checkSimpleUnit() local
266 if (singleUnit.dimensionality != 1 || singleUnit.unitPrefix != UMEASURE_PREFIX_ONE) { in checkSimpleUnit()
322 UnitIndexAndDimension(const SingleUnitImpl &singleUnit, int32_t multiplier) { in UnitIndexAndDimension()
323 index = singleUnit.index; in UnitIndexAndDimension()
324 dimensionality = singleUnit.dimensionality * multiplier; in UnitIndexAndDimension()
344 auto singleUnit = *shouldBeMerged.singleUnits[unit_i]; in mergeUnitsAndDimensions() local
[all …]
Dnumber_longnames.cpp869 const SingleUnitImpl *singleUnit = mui.singleUnits[singleUnitIndex]; in calculateGenderForUnit() local
871 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit()
880 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit()
889 …return getGenderForBuiltin(locale, MeasureUnit::forIdentifier(singleUnit->getSimpleUnitID(), statu… in calculateGenderForUnit()
1174 SingleUnitImpl *singleUnit = productUnit.singleUnits[singleUnitIndex]; in processPatternTimes() local
1192 if (!MeasureUnit::findBySubType(singleUnit->getSimpleUnitID(), &simpleUnit)) { in processPatternTimes()
1204 U_ASSERT(singleUnit->dimensionality > 0); in processPatternTimes()
1205 int32_t dimensionality = singleUnit->dimensionality; in processPatternTimes()
1232 singleUnit->dimensionality = 1; in processPatternTimes()
1236 UMeasurePrefix prefix = singleUnit->unitPrefix; in processPatternTimes()
[all …]
Dmeasunit_impl.h220 MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status);
309 bool appendSingleUnit(const SingleUnitImpl& singleUnit, UErrorCode& status);
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/
DLongNameHandler.java718 SingleUnitImpl singleUnit = singleUnits.get(singleUnitIndex); in calculateGenderForUnit() local
720 if (Math.abs(singleUnit.getDimensionality()) != 1) { in calculateGenderForUnit()
729 if (Math.abs(singleUnit.getDimensionality()) != 1) { in calculateGenderForUnit()
738 return getGenderForBuiltin(locale, MeasureUnit.forIdentifier(singleUnit.getSimpleUnitID())); in calculateGenderForUnit()
1035 SingleUnitImpl singleUnit = singleUnits.get(singleUnitIndex); in processPatternTimes() local
1052 simpleUnit = MeasureUnit.findBySubType(singleUnit.getSimpleUnitID()); in processPatternTimes()
1060 singleUnit.getSimpleUnitID()); in processPatternTimes()
1065 assert singleUnit.getDimensionality() > 0; in processPatternTimes()
1066 int dimensionality = singleUnit.getDimensionality(); in processPatternTimes()
1096 singleUnit.setDimensionality(1); in processPatternTimes()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DLongNameHandler.java716 SingleUnitImpl singleUnit = singleUnits.get(singleUnitIndex); in calculateGenderForUnit() local
718 if (Math.abs(singleUnit.getDimensionality()) != 1) { in calculateGenderForUnit()
727 if (Math.abs(singleUnit.getDimensionality()) != 1) { in calculateGenderForUnit()
736 return getGenderForBuiltin(locale, MeasureUnit.forIdentifier(singleUnit.getSimpleUnitID())); in calculateGenderForUnit()
1033 SingleUnitImpl singleUnit = singleUnits.get(singleUnitIndex); in processPatternTimes() local
1050 simpleUnit = MeasureUnit.findBySubType(singleUnit.getSimpleUnitID()); in processPatternTimes()
1058 singleUnit.getSimpleUnitID()); in processPatternTimes()
1063 assert singleUnit.getDimensionality() > 0; in processPatternTimes()
1064 int dimensionality = singleUnit.getDimensionality(); in processPatternTimes()
1094 singleUnit.setDimensionality(1); in processPatternTimes()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DMeasureUnit.java485 SingleUnitImpl singleUnit = getSingleUnitImpl(); in withPrefix() local
486 singleUnit.setPrefix(prefix); in withPrefix()
487 return singleUnit.build(); in withPrefix()
533 SingleUnitImpl singleUnit = getSingleUnitImpl(); in withDimensionality() local
534 singleUnit.setDimensionality(dimensionality); in withDimensionality()
535 return singleUnit.build(); in withDimensionality()
585 for (SingleUnitImpl singleUnit : in product()
587 implCopy.appendSingleUnit(singleUnit); in product()
611 for (SingleUnitImpl singleUnit : singleUnits) { in splitToSingleUnits()
612 result.add(singleUnit.build()); in splitToSingleUnits()
/external/icu/android_icu4j/src/main/java/android/icu/util/
DMeasureUnit.java408 SingleUnitImpl singleUnit = getSingleUnitImpl(); in withPrefix() local
409 singleUnit.setPrefix(prefix); in withPrefix()
410 return singleUnit.build(); in withPrefix()
453 SingleUnitImpl singleUnit = getSingleUnitImpl(); in withDimensionality() local
454 singleUnit.setDimensionality(dimensionality); in withDimensionality()
455 return singleUnit.build(); in withDimensionality()
503 for (SingleUnitImpl singleUnit : in product()
505 implCopy.appendSingleUnit(singleUnit); in product()
528 for (SingleUnitImpl singleUnit : singleUnits) { in splitToSingleUnits()
529 result.add(singleUnit.build()); in splitToSingleUnits()
/external/icu/libicu/cts_headers/
Dmeasunit_impl.h220 MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status);
309 bool appendSingleUnit(const SingleUnitImpl& singleUnit, UErrorCode& status);
/external/cldr/docs/ldml/
Dtr35-general.md1265 2. If the singleUnit is a currency_unit
1270 3. If singleUnit starts with a dimensionality_prefix, such as 'square-'
1274 4. remove the dimensionality_prefix from singleUnit
1275 4. if singleUnit starts with an si_prefix, such as 'centi' and/or a number_prefix such as '100'
1279 4. remove the si_prefix from singleUnit
1281 …5. Set corePattern to be the getValue(singleUnit, locale, length, singlePluralCategory, singleCas…