Java Zero Format zeroIfNull(Integer i)

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

Description

zero If Null

License

Open Source License

Declaration

public static int zeroIfNull(Integer i) 

Method Source Code

//package com.java2s;

public class Main {
    public static int zeroIfNull(Integer i) {
        return i != null ? i.intValue() : 0;
    }//  w w  w  .  ja  v  a2s.  co  m

    public static long zeroIfNull(Long l) {
        return l != null ? l.longValue() : 0;
    }
}

Related

  1. zerofill(int x, int desiredWidth)
  2. zeroFillString(String originalString, int numZeros)
  3. zeroFormat(Integer source)
  4. zeroFormattedStr(int number, int length)
  5. zeroIfNull(Integer i)
  6. zeroIfNullStrict(Integer i)
  7. zeroInterval(byte[] x, int start, int end)
  8. zeroLowerBits(long bits, int nBits)
  9. zeroMatrix(int M, int N, double mat[][])