org.apache.commons.lang.math.NumberUtils#INTEGER_ONE源码实例Demo

下面列出了org.apache.commons.lang.math.NumberUtils#INTEGER_ONE 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: astor   文件: BooleanUtils.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码2 项目: lams   文件: BooleanUtils.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码3 项目: coming   文件: Elixir_0014_t.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码4 项目: coming   文件: Arja_0020_s.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码5 项目: coming   文件: Arja_0020_t.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码6 项目: coming   文件: Lang_51_BooleanUtils_s.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码7 项目: coming   文件: Lang_51_BooleanUtils_t.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码8 项目: coming   文件: Nopol2015_003_s.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码9 项目: astor   文件: BooleanUtils.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码10 项目: coming   文件: Nopol2015_003_t.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码11 项目: coming   文件: Nopol2017_0059_t.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码12 项目: coming   文件: Nopol2017_0059_s.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码13 项目: coming   文件: Elixir_0014_s.java
/**
 * <p>Converts a Boolean to a Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 *
 * <p><code>null</code> will be converted to <code>null</code>.</p>
 *
 * <pre>
 *   BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 * </pre>
 *
 * @param bool  the Boolean to convert
 * @return one if Boolean.TRUE, zero if Boolean.FALSE, <code>null</code> if <code>null</code>
 */
public static Integer toIntegerObject(Boolean bool) {
    if (bool == null) {
        return null;
    }
    return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码14 项目: astor   文件: BooleanUtils.java
/**
 * <p>Converts a boolean to an Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 * 
 * <pre>
 *   BooleanUtils.toIntegerObject(true)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(false) = new Integer(0)
 * </pre>
 *
 * @param bool  the boolean to convert
 * @return one if <code>true</code>, zero if <code>false</code>
 */
public static Integer toIntegerObject(boolean bool) {
    return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码15 项目: coming   文件: Arja_0072_t.java
/**
 * <p>Converts a boolean to an Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 * 
 * <pre>
 *   BooleanUtils.toIntegerObject(true)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(false) = new Integer(0)
 * </pre>
 *
 * @param bool  the boolean to convert
 * @return one if <code>true</code>, zero if <code>false</code>
 */
public static Integer toIntegerObject(boolean bool) {
    return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码16 项目: coming   文件: Elixir_0014_t.java
/**
 * <p>Converts a boolean to an Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 * 
 * <pre>
 *   BooleanUtils.toIntegerObject(true)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(false) = new Integer(0)
 * </pre>
 *
 * @param bool  the boolean to convert
 * @return one if <code>true</code>, zero if <code>false</code>
 */
public static Integer toIntegerObject(boolean bool) {
    return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码17 项目: coming   文件: Nopol2015_003_s.java
/**
 * <p>Converts a boolean to an Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 * 
 * <pre>
 *   BooleanUtils.toIntegerObject(true)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(false) = new Integer(0)
 * </pre>
 *
 * @param bool  the boolean to convert
 * @return one if <code>true</code>, zero if <code>false</code>
 */
public static Integer toIntegerObject(boolean bool) {
    return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码18 项目: coming   文件: Nopol2017_0059_t.java
/**
 * <p>Converts a boolean to an Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 * 
 * <pre>
 *   BooleanUtils.toIntegerObject(true)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(false) = new Integer(0)
 * </pre>
 *
 * @param bool  the boolean to convert
 * @return one if <code>true</code>, zero if <code>false</code>
 */
public static Integer toIntegerObject(boolean bool) {
    return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码19 项目: coming   文件: Nopol2017_0059_s.java
/**
 * <p>Converts a boolean to an Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 * 
 * <pre>
 *   BooleanUtils.toIntegerObject(true)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(false) = new Integer(0)
 * </pre>
 *
 * @param bool  the boolean to convert
 * @return one if <code>true</code>, zero if <code>false</code>
 */
public static Integer toIntegerObject(boolean bool) {
    return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
 
源代码20 项目: coming   文件: Elixir_0014_s.java
/**
 * <p>Converts a boolean to an Integer using the convention that
 * <code>zero</code> is <code>false</code>.</p>
 * 
 * <pre>
 *   BooleanUtils.toIntegerObject(true)  = new Integer(1)
 *   BooleanUtils.toIntegerObject(false) = new Integer(0)
 * </pre>
 *
 * @param bool  the boolean to convert
 * @return one if <code>true</code>, zero if <code>false</code>
 */
public static Integer toIntegerObject(boolean bool) {
    return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}