/** * set item on target index. * @param index the index to set * @param newT the new item to set . * @return this * @since 1.1.2 */ public ListPropertyEditor<D, T> set(int index ,T newT){ Throwables.checkNegativeValue(index); Throwables.checkNull(newT); if(mList.size() <= index){ throw new IllegalArgumentException(); } T old = mList.set(index, newT); //dispatch if need. if (mMediator != null) { mMediator.dispatchItemChanged(mProperty, old, newT, index); } return this; }
/** * set item on target index. * @param index the index to set * @param newT the new item to set . * @return this * @since 1.1.2 */ public ListPropertyEditor<D, T> set(int index ,T newT){ Throwables.checkNegativeValue(index); Throwables.checkNull(newT); if(mList.size() <= index){ throw new IllegalArgumentException(); } T old = mList.set(index, newT); //dispatch if need. if (mMediator != null) { mMediator.dispatchItemChanged(mProperty, old, newT, index); } return this; }