equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
443 * this method returns true if a one should be generated (e.g., formatting |
443 * this method returns true if a one should be generated (e.g., formatting |
444 * 0.09 with "#.#"). |
444 * 0.09 with "#.#"). |
445 * @param alreadyRounded whether or not rounding up has already happened. |
445 * @param alreadyRounded whether or not rounding up has already happened. |
446 * @param valueExactAsDecimal whether or not collected digits provide |
446 * @param valueExactAsDecimal whether or not collected digits provide |
447 * an exact decimal representation of the value. |
447 * an exact decimal representation of the value. |
448 * @exception ArithmeticException if rounding is needed with rounding |
448 * @throws ArithmeticException if rounding is needed with rounding |
449 * mode being set to RoundingMode.UNNECESSARY |
449 * mode being set to RoundingMode.UNNECESSARY |
450 * @return true if digit <code>maximumDigits-1</code> should be |
450 * @return true if digit <code>maximumDigits-1</code> should be |
451 * incremented |
451 * incremented |
452 */ |
452 */ |
453 private boolean shouldRoundUp(int maximumDigits, |
453 private boolean shouldRoundUp(int maximumDigits, |