Skip to content

Instantly share code, notes, and snippets.

@holmeszyx
Created August 23, 2012 11:25
Show Gist options
  • Select an option

  • Save holmeszyx/3435736 to your computer and use it in GitHub Desktop.

Select an option

Save holmeszyx/3435736 to your computer and use it in GitHub Desktop.
Variable
package com.xxx.view.adpter;
import java.util.List;
/**
* 可变的的内容
* @author holmes
*
* @param <T>
*/
public interface Variable <T>{
/**
* 刷新
* @param data
*/
public void refresh(List<T> data);
/**
* 追加一个
* @param data
*/
public void append(T data);
/**
* 批量追加
* @param data
*/
public void append(List<T> data);
/**
* 移除一个Item
* @param item
* @return 被移除的item
*/
public T remove(T item);
/**
* 通过位置移除一个Item
* @param position
* @return 被移除的item
*/
public T remove(int position);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment