Java Number Format Pattern formatDisplay(String displayString)

Here you can find the source of formatDisplay(String displayString)

Description

format Display

License

BSD License

Parameter

Parameter Description
displayString to display in our format

Return

the double display format string

Declaration

public static String formatDisplay(String displayString) 

Method Source Code

//package com.java2s;
/**//from  ww  w. ja v  a2 s. co  m
 * Copyright 5AM Solutions Inc, ESAC, ScenPro & SAIC
 *
 * Distributed under the OSI-approved BSD 3-Clause License.
 * See http://ncip.github.com/caintegrator/LICENSE.txt for details.
 */

import java.text.DecimalFormat;

public class Main {
    private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.####################");

    /**
     * 
     * @param displayString to display in our format
     * @return the double display format string
     */
    public static String formatDisplay(String displayString) {
        return DECIMAL_FORMAT.format(Double.valueOf(displayString));
    }

    /**
     * 
     * @param value to display in our format
     * @return the double display format string
     */
    public static String formatDisplay(Double value) {
        return DECIMAL_FORMAT.format(value);
    }
}

Related

  1. formatBytes(long bytes)
  2. formatBytes(long bytes)
  3. formatBytes(long bytes)
  4. formatBytes(long numBytes)
  5. formatDashboardNumber(Number amount)
  6. formatDollar(Object obj)
  7. formatDollarTd(Object obj)
  8. formatFileLength(long length)
  9. formatGopNumber(Number gop)