示例#1
0
  public int getPosition(ListBean source) {
    for (int i = 0; i < source.getSize(); i++) {
      ItemBean item = source.getItem(i);
      if (item != null && item.getIdLong() == this.firstItemId) {
        return i;
      }
    }

    return 0;
  }
 private void clearAndReplaceValue(String position, ListBean<MessageBean> newValue) {
   hashMap.put(position, new MessageListBean());
   hashMap.get(position).getItemList().clear();
   hashMap.get(position).getItemList().addAll(newValue.getItemList());
   hashMap.get(position).setTotal_number(newValue.getTotal_number());
 }