Example usage for org.apache.commons.lang3.math NumberUtils INTEGER_ONE

List of usage examples for org.apache.commons.lang3.math NumberUtils INTEGER_ONE

Introduction

In this page you can find the example usage for org.apache.commons.lang3.math NumberUtils INTEGER_ONE.

Prototype

Integer INTEGER_ONE

To view the source code for org.apache.commons.lang3.math NumberUtils INTEGER_ONE.

Click Source Link

Document

Reusable Integer constant for one.

Usage

From source file:eu.jsan.duvi.commons.conversion.bool.BooleanToIntegerConverter.java

@Override
public Integer convertToDatabaseColumn(Boolean attribute) {
    return (attribute != null && attribute) ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}

From source file:eu.jsan.duvi.commons.conversion.bool.BooleanToIntegerConverter.java

@Override
public Boolean convertToEntityAttribute(Integer dbData) {
    return NumberUtils.INTEGER_ONE.equals(dbData);
}

From source file:org.kuali.kra.award.notesandattachments.attachments.AwardAttachmentFormBean.java

private static Integer createNextDocNumber(final Integer docNumber) {
    return docNumber == null ? NumberUtils.INTEGER_ONE : Integer.valueOf(docNumber.intValue() + 1);
}

From source file:org.kuali.kra.coi.notesandattachments.CoiNotesAndAttachmentsHelper.java

/**
 * Creates the next doc number from a passed in doc number.  If null 1 is returned.
 * @param docNumber the doc number to base the new number off of.
 * @return the new doc number./*from   w  ww.ja  v a 2  s.c  om*/
 */
private static Integer createNextDocNumber(final Integer docNumber) {
    return docNumber == null ? NumberUtils.INTEGER_ONE : Integer.valueOf(docNumber.intValue() + 1);
}