Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1220)

Unified Diff: icu4j/main/classes/core/src/com/ibm/icu/impl/number/rounders/NoRounder.java

Issue 315420043: DecimalFormat rewrite, Java Base URL: svn+icussh://source.icu-project.org/repos/icu/branches/shane/numberformat/
Patch Set: r39857: Last commit before merge to trunk. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: icu4j/main/classes/core/src/com/ibm/icu/impl/number/rounders/NoRounder.java
===================================================================
--- icu4j/main/classes/core/src/com/ibm/icu/impl/number/rounders/NoRounder.java (revision 0)
+++ icu4j/main/classes/core/src/com/ibm/icu/impl/number/rounders/NoRounder.java (revision 39857)
@@ -0,0 +1,24 @@
+// © 2017 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html#License
+package com.ibm.icu.impl.number.rounders;
+
+import com.ibm.icu.impl.number.FormatQuantity;
+import com.ibm.icu.impl.number.Rounder;
+
+/** Sets the integer and fraction length based on the properties, but does not perform rounding. */
+public final class NoRounder extends Rounder {
+
+ public static NoRounder getInstance(IBasicRoundingProperties properties) {
+ return new NoRounder(properties);
+ }
+
+ private NoRounder(IBasicRoundingProperties properties) {
+ super(properties);
+ }
+
+ @Override
+ public void apply(FormatQuantity input) {
+ applyDefaults(input);
+ input.roundToInfinity();
+ }
+}
Property changes on: icu4j/main/classes/core/src/com/ibm/icu/impl/number/rounders/NoRounder.java
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain;charset=utf-8
\ No newline at end of property

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b