Java Decimal Format getInteger(Double d)

Here you can find the source of getInteger(Double d)

Description

get Integer

License

Open Source License

Declaration

public static Integer getInteger(Double d) 

Method Source Code


//package com.java2s;
import java.text.DecimalFormat;

public class Main {
    private static DecimalFormat integerFormatter = new DecimalFormat("######0");

    public static Integer getInteger(Double d) {
        if (d == null) {
            return null;
        } else {//from   w  w w .  j  av  a 2 s  .c  o m
            return Integer.valueOf(integerFormatter.format(d));
        }
    }
}

Related

  1. getDoubleForDisplay(Double d)
  2. getDoubleFromTaxSet(String taxSetValue)
  3. getDoubleWithTwoDecimalDigits(double value)
  4. getDurationString(double duration)
  5. getEngineeringNotation(final double d)
  6. getIntNum(Double value)
  7. getProgressExact(double balance, double cost)
  8. getRealEye(double eye)
  9. getRedondeoHaciaArriba(double pTotal)