LEFT | RIGHT |
1 // © 2017 and later: Unicode, Inc. and others. | 1 // © 2017 and later: Unicode, Inc. and others. |
2 // License & terms of use: http://www.unicode.org/copyright.html#License | 2 // License & terms of use: http://www.unicode.org/copyright.html#License |
3 package com.ibm.icu.impl.number.rounders; | 3 package com.ibm.icu.impl.number.rounders; |
4 | 4 |
5 import com.ibm.icu.impl.number.FormatQuantity; | 5 import com.ibm.icu.impl.number.FormatQuantity; |
6 import com.ibm.icu.impl.number.Rounder; | 6 import com.ibm.icu.impl.number.Rounder; |
7 | 7 |
8 /** Sets the integer and fraction length based on the properties, but does not p
erform rounding. */ | 8 /** Sets the integer and fraction length based on the properties, but does not p
erform rounding. */ |
9 public final class NoRounder extends Rounder { | 9 public final class NoRounder extends Rounder { |
10 | 10 |
11 public static NoRounder getInstance(IBasicRoundingProperties properties) { | 11 public static NoRounder getInstance(IBasicRoundingProperties properties) { |
12 return new NoRounder(properties); | 12 return new NoRounder(properties); |
13 } | 13 } |
14 | 14 |
15 private NoRounder(IBasicRoundingProperties properties) { | 15 private NoRounder(IBasicRoundingProperties properties) { |
16 super(properties); | 16 super(properties); |
17 } | 17 } |
18 | 18 |
19 @Override | 19 @Override |
20 public void apply(FormatQuantity input) { | 20 public void apply(FormatQuantity input) { |
21 applyDefaults(input); | 21 applyDefaults(input); |
22 input.roundToInfinity(); | 22 input.roundToInfinity(); |
23 } | 23 } |
24 } | 24 } |
LEFT | RIGHT |