Java Number Round round(Integer a)

Here you can find the source of round(Integer a)

Description

Round.

License

Open Source License

Parameter

Parameter Description
a the a

Return

the int

Declaration

public static int round(Integer a) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from   www.  ja v a2s.  c o m*/
     * Round.
     *
     * @param a the a
     * @return the int
     */
    public static int round(Short a) {
        return Math.round(a.floatValue());
    }

    /**
     * Round.
     *
     * @param a the a
     * @return the int
     */
    public static int round(Integer a) {
        return Math.round(a.floatValue());
    }

    /**
     * Round.
     *
     * @param a the a
     * @return the int
     */
    public static int round(Float a) {
        return Math.round(a);
    }

    /**
     * Round.
     *
     * @param a the a
     * @return the long
     */
    public static long round(Long a) {
        return Math.round(a.doubleValue());
    }

    /**
     * Round.
     *
     * @param a the a
     * @return the long
     */
    public static long round(Double a) {
        return Math.round(a);
    }
}

Related

  1. round(int n)
  2. round(int start, int boundary)
  3. round(int t, int n, int decimals)
  4. round(int top, int div2, int divisor)
  5. round(int x, int quantum)
  6. round(Number number, Number unit)
  7. Round(Object in)
  8. round(String num, int length)
  9. round4(int n)