Java Number Convert convertsToLong(double v)

Here you can find the source of convertsToLong(double v)

Description

converts To Long

License

Apache License

Declaration

public static long convertsToLong(double v) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {

    public static long convertsToLong(double v) {
        BigDecimal b = new BigDecimal(v);
        return b.longValue();
    }/*  w ww .ja v  a 2 s  .c o m*/
}

Related

  1. convertNullToOne(final Object value)
  2. convertScientificToStandard(double value)
  3. convertSize(Long size)
  4. convertSizeG1DetailsToSizeG1(final String size, final char units)
  5. convertSizeToMB(long sizeInBytes)
  6. convertStringToObjectWrapper(String className, String value)
  7. convertToDecimal(Number n)
  8. convertToHours(long workingDuration)
  9. convertToInchesOfMercury(double altimeterSetting, String unit)