GWT 2.7.0

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) 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.


Method Summary
 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

GWT 2.7.0