![JAR search and dependency download from the Maven repository](/logo.png)
com.github.houbb.valid.jsr.constraint.MinConstraint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of valid-jsr Show documentation
Show all versions of valid-jsr Show documentation
The jsr-303 module for valid framework.
package com.github.houbb.valid.jsr.constraint;
import com.github.houbb.heaven.annotation.ThreadSafe;
import com.github.houbb.heaven.util.lang.NumUtil;
import com.github.houbb.valid.core.api.constraint.AbstractGreatThanConstraint;
/**
* 元素 min 约束
* (1)value 必须大于等于 min
* @author binbin.hou
* @since 0.0.3
* @see Integer
* @see Short
* @see Byte
* @see javax.validation.constraints.Min
*/
@ThreadSafe
class MinConstraint extends AbstractGreatThanConstraint {
public MinConstraint(boolean inclusive, Long expect) {
super(inclusive, expect);
}
public MinConstraint(Long expect) {
super(expect);
}
@Override
protected Long formatValue(Object contextValue) {
return NumUtil.parseLong(contextValue);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy