删除文件 ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/validate/enumd/ValidateEnum.java

This commit is contained in:
秋辞未寒 2024-12-09 09:43:01 +00:00 committed by Gitee
parent 9009a90ef2
commit a1f82a7d08
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,29 +0,0 @@
package org.dromara.common.core.validate.enumd;
import org.dromara.common.core.utils.StringUtils;
/**
* 枚举类型校验接口
*
* @author 秋辞未寒
* @date 2024-12-09
*/
public interface ValidateEnum {
/**
* 获取枚举code
* <pre>该code用于匹配</pre>
* @return 枚举code
*/
String getCode();
/**
* 校验枚举code
* @param code 枚举code
* @return 校验结果
*/
default boolean validate(String code) {
return StringUtils.equals(code, getCode());
}
}