#653 - Polishing.
Expose nullability in Identifiable, ResourceSupport and Links via Optional.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package org.springframework.hateoas;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Interface to mark objects that are identifiable by an ID of any type.
|
||||
@@ -27,7 +28,7 @@ public interface Identifiable<ID extends Serializable> {
|
||||
/**
|
||||
* Returns the id identifying the object.
|
||||
*
|
||||
* @return the identifier or {@literal null} if not available.
|
||||
* @return the identifier or {@link Optional#empty()} if not available.
|
||||
*/
|
||||
ID getId();
|
||||
Optional<ID> getId();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user