ITEM - Item typeID - Item id type@FunctionalInterface public interface ItemIdentifierProvider<ITEM,ID> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
ID |
getItemId(ITEM item)
Get the item identifier.
|
static <T> ItemIdentifierProvider<T,T> |
identity()
Returns an
ItemIdentifierProvider which returns the item itself as item identifier. |
ID getItemId(ITEM item)
item - Item for which to obtain the identifier (not null)null. Object.equals(Object) and
Object.hashCode() methods are used to compare item identifiers, so the returned identifier should
implement such methods in a consistent mannerstatic <T> ItemIdentifierProvider<T,T> identity()
ItemIdentifierProvider which returns the item itself as item identifier.T - Item typeItemIdentifierProviderCopyright © 2019 The Holon Platform. All rights reserved.