@Override
    public int getSectionPosition() {
        int currentPos = 0;

        for (final Map.Entry<String, Section> entry : sectionedAdapter.getSections().entrySet()) {
            final Section loopSection = entry.getValue();

            // ignore invisible sections
            if (!loopSection.isVisible()) {
                continue;
            }

            if (loopSection == section) {
                return currentPos;
            }

            final int sectionTotal = loopSection.getSectionItemsTotal();

            currentPos += sectionTotal;
        }

        throw new IllegalArgumentException("Section is not in the adapter.");
    }
This class represents a {@link Section Section} in the {@link SectionedRecyclerViewAdapter SectionedRecyclerViewAdapter}.
<p>
It provides helper methods for:
<ul>
<li>identifying position of this {@link Section Section}'s items in the {@link SectionedRecyclerViewAdapter SectionedRecyclerViewAdapter}</li>
<li>identifying position of the {@link SectionedRecyclerViewAdapter SectionedRecyclerViewAdapter} in this {@link Section Section}</li>
<li>notifying {@link SectionedRecyclerViewAdapter SectionedRecyclerViewAdapter} of item changes in this Section</li>
</ul>
library/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/SectionAdapter.java