forked from plusone/plusone-commons
ValidatableStringRecord 暂不支持序列化
This commit is contained in:
@@ -31,7 +31,6 @@ import com.google.common.collect.ImmutableMap;
|
||||
* 中国第二代居民身份证号
|
||||
*/
|
||||
public class Chinese2ndGenIDCardNumber extends IDCardNumber {
|
||||
private static final long serialVersionUID = 20241011231542L;
|
||||
|
||||
/** 省份编码 */
|
||||
private final String provinceCode;
|
||||
|
@@ -27,7 +27,6 @@ import javax.annotation.Nonnull;
|
||||
* 身份证号
|
||||
*/
|
||||
public abstract class IDCardNumber extends ValidatableStringRecord {
|
||||
private static final long serialVersionUID = 20241011231527L;
|
||||
|
||||
protected IDCardNumber(@Nonnull String idNumber, @Nonnull Pattern pattern)
|
||||
throws IllegalArgumentException{
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
package xyz.zhouxy.plusone.commons.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -33,12 +32,12 @@ import xyz.zhouxy.plusone.commons.util.AssertTools;
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract class ValidatableStringRecord
|
||||
implements Comparable<ValidatableStringRecord>, Serializable {
|
||||
implements Comparable<ValidatableStringRecord> {
|
||||
|
||||
@Nonnull
|
||||
private final String value;
|
||||
|
||||
private final transient Matcher matcher;
|
||||
private final Matcher matcher;
|
||||
|
||||
protected ValidatableStringRecord(@Nonnull String value, @Nonnull Pattern pattern) {
|
||||
this(value, pattern, "Invalid value");
|
||||
@@ -60,7 +59,7 @@ public abstract class ValidatableStringRecord
|
||||
|
||||
/**
|
||||
* 值对象的字符串值。
|
||||
*
|
||||
*
|
||||
* @return 字符串(不为空)
|
||||
*/
|
||||
public final String value() {
|
||||
@@ -98,5 +97,4 @@ public abstract class ValidatableStringRecord
|
||||
return matcher;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = -8365241662025469652L;
|
||||
}
|
||||
|
Reference in New Issue
Block a user