All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.houbb.valid.jsr.constraint.DigitsBigIntegerConstraint Maven / Gradle / Ivy

package com.github.houbb.valid.jsr.constraint;

import com.github.houbb.heaven.annotation.ThreadSafe;

import java.math.BigInteger;

/**
 * {@link javax.validation.constraints.Digits} 约束注解实现
 * @author binbin.hou
 * @since 0.0.3
 * @see BigInteger
 */
@ThreadSafe
class DigitsBigIntegerConstraint extends AbstractDigitsConstraint {

    public DigitsBigIntegerConstraint(int integer, int fraction) {
        super(integer, fraction);
    }

    public DigitsBigIntegerConstraint(int integer) {
        super(integer);
    }

    @Override
    protected int getIntegerDigits(BigInteger value) {
        return value.toString().length();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy