Java Long to Int longToInt(final Long l, final String name, final int deflt)

Here you can find the source of longToInt(final Long l, final String name, final int deflt)

Description

long To Int

License

Open Source License

Declaration

public static int longToInt(final Long l, final String name, final int deflt) 

Method Source Code

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

public class Main {
    public static int longToInt(final Long l, final String name, final int deflt) {
        if (l == null) {
            return deflt;
        }//from w  w  w .j a  va 2  s . co m
        if (l > Integer.MAX_VALUE) {
            throw new IllegalArgumentException(name + " can be no greater than " + Integer.MAX_VALUE);
        }
        return new Long(l).intValue();
    }
}

Related

  1. long2int(final long l)
  2. long2Int(final long v)
  3. long2int(final long[] a)
  4. Long2Int(long i)
  5. long2int(Long source)
  6. longToInt(long d)
  7. longToInt(Long l)
  8. longToInt(long l)
  9. longToInt(Long l)