code: public final boolean collapseGroup(final int groupIndex) {
          ExpandableListAdapter adapter = getExpandableListAdapter();
  
          if (adapter != null && isGroupExpanded(groupIndex)) {
              expandedGroups.remove(groupIndex);
              notifyDataSetChanged();
              return true;
          }
  
          return false;
      }
docs: Collapses the group, which corresponds to a specific index.
  
  @param groupIndex
  The index of the group, which should be collapsed, as an {@link Integer} value
  @return True if the group has been collapsed, false otherwise