Java Number Convert convertMinutesToHours(Long minutes)

Here you can find the source of convertMinutesToHours(Long minutes)

Description

convert Minutes To Hours

License

Open Source License

Declaration

public static BigDecimal convertMinutesToHours(Long minutes) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

public class Main {
    public static BigDecimal convertMinutesToHours(Long minutes) {
        if (minutes == null) {
            return BigDecimal.ZERO;
        } else {//from  w  ww.ja v a  2s. co  m
            return new BigDecimal(minutes.doubleValue() / 60).setScale(1, BigDecimal.ROUND_HALF_UP);
        }
    }
}

Related

  1. convertFromMsToMinutes(Integer duration)
  2. convertGeoCoordinateToDouble(int point)
  3. convertImperialToMetric(String areaImp)
  4. convertJcoDecimalDefaultValue( String jcoDefaultDecimalValue)
  5. convertMB2GB(int valueMB)
  6. convertNanoDiff(long startNanos, long stopNanos, TimeUnit timeUnit)
  7. convertNullToOne(final Object value)
  8. convertScientificToStandard(double value)
  9. convertSize(Long size)