public void clear() {
        if (mObjects.isEmpty()) {
            return;
        }
        synchronized (mLock) {
            final int size = getItemCount();
            mObjects.clear();
            notifyItemRangeRemoved(0, size);
        }
    }
public void clear ( ) { if ( mObjects . isEmpty ( ) ) { return ; } synchronized ( mLock ) { final int size = getItemCount ( ) ; mObjects . clear ( ) ; notifyItemRangeRemoved ( 0 , size ) ; } }
Remove all elements from the list.