public T removeItemByPosition(int position){
  if (position < mObjects.size() && position != INVALID_POSITION) {
    mObjectDeleted=mObjects.remove(position);
    mHasDeletedPosition=position;
    notifyDataSetChanged();
    return mObjectDeleted;
  }
 else {
    throw new IndexOutOfBoundsException("The position is invalid!");
  }
}

public T removeItemByPosition ( int position ) { if ( position < mObjects . size ( ) && position != INVALID_POSITION ) { mObjectDeleted = mObjects . remove ( position ) ; mHasDeletedPosition = position ; notifyDataSetChanged ( ) ; return mObjectDeleted ; } else { throw new IndexOutOfBoundsException ( "The position is invalid!" ) ; } }
remove the specified object by the position .
