public interface IWithLongCode
getCode 方法。
用于像自定义异常等需要带有 code 字段的类,
方便其它地方的程序判断该类的是否实现了此接口,以此获取其实例的 code 字段的值。| Modifier and Type | Method and Description |
|---|---|
long |
getCode()
获取码值
|
default boolean |
isCodeEquals(long code)
判断
code 与给定的值是否相等 |
default boolean |
isSameCodeAs(IWithCode<?> other)
判断是否与给定的
IWithCode 有着相等的 code |
default boolean |
isSameCodeAs(IWithIntCode other)
判断是否与给定的
IWithIntCode 有着相等的 code |
default boolean |
isSameCodeAs(IWithLongCode other)
判断是否与给定的
IWithLongCode 有着相等的 code |
long getCode()
default boolean isCodeEquals(long code)
code 与给定的值是否相等code - 用于判断的值default boolean isSameCodeAs(@Nullable IWithCode<?> other)
IWithCode 有着相等的 codeother - 用于比较的对象default boolean isSameCodeAs(@Nullable IWithIntCode other)
IWithIntCode 有着相等的 codeother - 用于比较的对象default boolean isSameCodeAs(@Nullable IWithLongCode other)
IWithLongCode 有着相等的 codeother - 用于比较的对象Copyright © 2026. All rights reserved.