code: public void clear() {
          @SuppressWarnings("unchecked") SparseArray<BaseNotificationItem> cloneArray =
                  (SparseArray<BaseNotificationItem>) notificationArray.clone();
          notificationArray.clear();
  
          for (int i = 0; i < cloneArray.size(); i++) {
              final BaseNotificationItem n = cloneArray.get(cloneArray.keyAt(i));
              n.cancel();
          }
  
      }
docs: Clear and cancel all notifications which inside this helper {@link #notificationArray}.