code: public final void setAdapter(@Nullable final ExpandableListAdapter adapter) {
          expandedGroups.clear();
  
          if (adapter != null) {
              this.adapter = new AdapterWrapper(adapter);
              super.setAdapter(this.adapter);
          } else {
              this.adapter = null;
              super.setAdapter(null);
          }
      }
docs: Sets the adapter that provides data to this view.
  
  @param adapter
  The adapter, which should be set, as an instance of the type {@link
  ExpandableListAdapter} or null, if no adapter should be set