com.holonplatform.vaadin.data

## Interface ItemIdentifierProvider<ITEM,ID>

- Type Parameters:
    `ITEM` - Item type
    `ID` - Item id type
  All Superinterfaces:
    Serializable
  Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface ItemIdentifierProvider<ITEM,ID>
      extends Serializable

  Provider to obtain the identifier of an item.
  Since:
    5.0.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    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.

- - ### Method Detail

    - #### getItemId

          ID getItemId(ITEM item)

      Get the item identifier.
      Parameters:
        `item` - Item for which to obtain the identifier (not null)
      Returns:
        The item identifier, which must not be `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 manner

    - #### identity

          static <T> ItemIdentifierProvider<T,T> identity()

      Returns an `ItemIdentifierProvider` which returns the item itself as item identifier.
      Type Parameters:
        `T` - Item type
      Returns:
        Identity `ItemIdentifierProvider`

Copyright © 2017 The Holon Platform. All rights reserved.