添加 equalsCode 方法

This commit is contained in:
2024-03-15 09:19:56 +08:00
parent 7f80a411db
commit 9a0b6404cb
3 changed files with 14 additions and 0 deletions

View File

@@ -25,4 +25,8 @@ package xyz.zhouxy.plusone.commons.base;
*/
public interface IWithIntCode {
int getCode();
default boolean equalsCode(int code) {
return getCode() == code;
}
}