class WikiPage extends WikiPageReference {

    public List<String> getSections() {
        List<String> result = new ArrayList<>();
        Matcher matcher = MediaWikiUtil.HEADING_PATTERN.matcher(text);
        int start = 0;
        while (matcher.find()) {
            int end = matcher.start();
            result.add(text.substring(start, end));
            start = end;
        }
        result.add(text.substring(start));
        return result;
    }

    public  WikiPage(int pageId, int namespaceId, String title, String text);

}