Java Object NVL nvlInteger(String pString, Integer pInteger)

Here you can find the source of nvlInteger(String pString, Integer pInteger)

Description

nvl Integer

License

Open Source License

Declaration

public static final Integer nvlInteger(String pString, Integer pInteger) 

Method Source Code

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

public class Main {
    public static final Integer INTEGER_MAX_VALUE = new Integer(
            Integer.MAX_VALUE);

    public static final Integer nvlInteger(String pString, Integer pInteger) {
        if (isNull(pString)) {
            return pInteger;
        }/*  w  w  w . j  a  va  2 s  .c o m*/
        if (pString.equals("unbounded")) {
            return INTEGER_MAX_VALUE;
        }
        return Integer.valueOf(pString);
    }

    public static boolean isNull(Object pStringOrObject) {
        if (pStringOrObject == null || pStringOrObject.equals("")) {
            return true;
        }
        return false;
    }
}

Related

  1. nvl(T... values)
  2. nvl2(Object obj, Object obj1, Object obj2)
  3. nvlArr(String[][] planarArr)
  4. nvlDefault(String val)
  5. nvlEmptyString(String object)
  6. nvlLang(Object contend)
  7. NVLn(String str, String replace)
  8. nvlt(Object o)