1 // 2017 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html#License 3 package com.ibm.icu.impl.number; 4 5 import com.ibm.icu.number.Scale; 6 7 /** 8 * Wraps a {@link Scale} for use in the number formatting pipeline. 9 */ 10 public class MultiplierFormatHandler implements MicroPropsGenerator { 11 final Scale multiplier; 12 final MicroPropsGenerator parent; 13 14 public MultiplierFormatHandler(Scale multiplier, MicroPropsGenerator parent) { 15 this.multiplier = multiplier; 16 this.parent = parent; 17 } 18 19 @Override 20 public MicroProps processQuantity(DecimalQuantity quantity) { 21 MicroProps micros = parent.processQuantity(quantity); 22 multiplier.applyTo(quantity); 23 return micros; 24 } 25 } 26