T
- the data type of records in the listpublic interface ProvidesKey<T>
Implementors of ProvidesKey
provide a key for list items, such that
items that are to be treated as distinct (for example, for editing) have
distinct keys.
The key must implement a coherent set of Object.equals(Object)
and
Object.hashCode()
methods such that if objects A
and B
are to be treated as identical, then A.equals(B)
, B.equals(A)
, and A.hashCode() == B.hashCode()
. If A
and
B
are to be treated as unequal, then it must be the case that A.equals(B) == false
and B.equals(A) == false
.
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getKey(T item)
Get the key for a list item.
|
java.lang.Object getKey(T item)
item
- the list item