/* * [DecimalCommas.java] * * Summary: Display a number with commas between the groups of digits, North American style. * * Copyright: (c) 1999-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 1999-01-17 */ package com.mindprod.inwords; /** * Display a number with commas between the groups of digits, North American style. *

* e.g. * -12345 -> -12,345 *

* * @author Roedy Green, Canadian Mind Products * @version 1.0 1999-01-17 * @ * @since 1999-01-17 */ public final class DecimalCommas extends DecimalBase implements ToWords { private static final int FIRST_COPYRIGHT_YEAR = 1999; /** * undisplayed copyright notice * * @noinspection UnusedDeclaration */ private static final String EMBEDDED_COPYRIGHT = "Copyright: (c) 1999-2017 Roedy Green, Canadian Mind Products, http://mindprod.com"; /** * test harness * * @param args not used */ public static void main( String[] args ) { Test.test( new DecimalCommas(), null ); } // end main /** * @inheritDoc */ public String toWords( long num ) { return super.toWords( num, ',' ); } } // end DecimalCommas