Interface IItemReuseStrategy

All Superinterfaces:
IClusterable, Serializable
All Known Implementing Classes:
DefaultItemReuseStrategy, ReuseIfModelsEqualStrategy

public interface IItemReuseStrategy extends IClusterable
Interface for item reuse strategies.

Notice: Child items will be rendered in the order they are provided by the returned iterator, so it is important that the strategy preserve this order

Igor Vaynberg (ivaynberg)
  • Method Details

    • getItems

      <T> Iterator<Item<T>> getItems(IItemFactory<T> factory, Iterator<IModel<T>> newModels, Iterator<Item<T>> existingItems)
      Returns an iterator over items that will be added to the view. The iterator needs to return all the items because the old ones are removed prior to the new ones added.
      Type Parameters:
      T - type of Item
      factory - implementation of IItemFactory
      newModels - iterator over models for items
      existingItems - iterator over child items
      iterator over items that will be added after all the old items are moved.