Package com.google.gwt.view.client
Interface ProvidesKey<T>
-
- Type Parameters:
T
- the data type of records in the list
- All Known Subinterfaces:
SelectionModel<T>
,SetSelectionModel<T>
- All Known Implementing Classes:
AbstractDataProvider
,AsyncDataProvider
,DefaultSelectionModel
,EntityProxyKeyProvider
,ListDataProvider
,MultiSelectionModel
,NoSelectionModel
,OrderedMultiSelectionModel
,SelectionModel.AbstractSelectionModel
,SimpleKeyProvider
,SingleSelectionModel
public 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)
andObject.hashCode()
methods such that if objectsA
andB
are to be treated as identical, thenA.equals(B)
,B.equals(A)
, andA.hashCode() == B.hashCode()
. IfA
andB
are to be treated as unequal, then it must be the case thatA.equals(B) == false
andB.equals(A) == false
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getKey(T item)
Get the key for a list item.
-
-
-
Method Detail
-
getKey
java.lang.Object getKey(T item)
Get the key for a list item.- Parameters:
item
- the list item- Returns:
- the key that represents the item
-
-