Java Long Number From toLongId(Integer i)

Here you can find the source of toLongId(Integer i)

Description

to Long Id

License

Open Source License

Declaration

public static Long toLongId(Integer i) 

Method Source Code

//package com.java2s;
//it under the terms of the GNU Affero General Public License as published by

public class Main {
    public static Long toLongId(Integer i) {
        if (i == null)
            return null;
        return Long.valueOf(i.longValue());
    }/*from  w  w  w.  j  a v  a 2  s . c  o m*/

    public static Long toLongId(Number i) {
        if (i == null)
            return null;
        return Long.valueOf(i.longValue());
    }

    public static Long toLongId(int i) {
        return Long.valueOf(i);
    }

    public static Long toLongId(Object o) {
        if (o == null)
            return null;
        if (o instanceof Integer)
            return toLongId((Integer) o);
        else if (o instanceof Long)
            return (Long) o;
        else
            throw new IllegalArgumentException("toLongId(" + o + ")");
    }
}

Related

  1. toLongBE(byte[] b, int i)
  2. toLongBE(byte[] src, int offset)
  3. toLongDate()
  4. toLongDefaultIfNull(Long configured, long theDefault)
  5. toLongExactWithoutOverflow(float value)
  6. toLongInt(byte[] b)
  7. toLongitude(long fsuipcLongitude)
  8. toLongitude(String latLng)
  9. toLongLE(byte target[], int offset, int numBytes, long value)