Package com.github.mizool.core
Interface Identifiable<T extends Identifiable<T>>
@NullMarked
public interface Identifiable<T extends Identifiable<T>>
-
Method Summary
Modifier and TypeMethodDescription@Nullable Identifier<T>getId()default Identifier<T>obtainId()
-
Method Details
-
getId
@Nullable Identifier<T> getId()- Returns:
- the ID, may be
null(e.g. because the Identifiable is in the process of being created)
-
obtainId
- Returns:
- the non-null ID
- Throws:
IllegalStateException- if the ID is null, e.g. because the Identifiable is in the process of being created
-