OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.chrome.browser.ntp.cards; |
| 6 |
| 7 /** |
| 8 * Interface to allow propagating change events upwards in the tree. |
| 9 */ |
| 10 public interface NodeParent { |
| 11 /** |
| 12 * Notifies that {@code count} items starting at position {@code index} unde
r the {@code child} |
| 13 * have changed. |
| 14 * @param child The child whose items have changed. |
| 15 * @param index The starting position of the range of changed items, relativ
e to the |
| 16 * {@code child}. |
| 17 * @param count The number of changed items. |
| 18 * @see android.support.v7.widget.RecyclerView.Adapter#notifyItemRangeChange
d(int, int) |
| 19 */ |
| 20 void onItemRangeChanged(TreeNode child, int index, int count); |
| 21 |
| 22 /** |
| 23 * Notifies that {@code count} items starting at position {@code index} unde
r the {@code child} |
| 24 * have been added. |
| 25 * @param child The child to which items have been added. |
| 26 * @param index The starting position of the range of added items, relative
to the child. |
| 27 * @param count The number of added items. |
| 28 * @see android.support.v7.widget.RecyclerView.Adapter#notifyItemRangeInsert
ed(int, int) |
| 29 */ |
| 30 void onItemRangeInserted(TreeNode child, int index, int count); |
| 31 |
| 32 /** |
| 33 * Notifies that {@code count} items starting at position {@code index} unde
r the {@code child} |
| 34 * have been removed. |
| 35 * @param child The child from which items have been removed. |
| 36 * @param index The starting position of the range of removed items, relativ
e to the child. |
| 37 * @param count The number of removed items. |
| 38 * @see android.support.v7.widget.RecyclerView.Adapter#notifyItemRangeRemove
d(int, int) |
| 39 */ |
| 40 void onItemRangeRemoved(TreeNode child, int index, int count); |
| 41 } |
OLD | NEW |