class Reference extends LinkNodeBase implements ReferenceNode<ReferenceRepository, Reference, RefNode> {
    protected BasedSequence openingMarker = BasedSequence.NULL;
    protected BasedSequence reference = BasedSequence.NULL;
    protected BasedSequence closingMarker = BasedSequence.NULL;

    @NotNull
    @Override
    public BasedSequence[] getSegments() {
        return new BasedSequence[] {
                openingMarker,
                reference,
                closingMarker,
                urlOpeningMarker,
                url,
                pageRef,
                anchorMarker,
                anchorRef,
                urlClosingMarker,
                titleOpeningMarker,
                title,
                titleClosingMarker
        };
    }

    @NotNull
    @Override
    public BasedSequence[] getSegmentsForChars() {<FILL_FUNCTION_BODY>}

    @Override
    public int compareTo(Reference other) {
        return SequenceUtils.compare(getReference(), other.getReference(), true);
    }

    @Nullable
    @Override
    public RefNode getReferencingNode(@NotNull Node node) {
        return node instanceof RefNode ? (RefNode) node : null;
    }

    @Override
    public void getAstExtra(@NotNull StringBuilder out) {
        delimitedSegmentSpanChars(out, openingMarker, reference, closingMarker, "ref");
        delimitedSegmentSpanChars(out, urlOpeningMarker, url, urlClosingMarker, "url");
        delimitedSegmentSpanChars(out, titleOpeningMarker, title, titleClosingMarker, "title");
    }

    public Reference(BasedSequence label, BasedSequence url, BasedSequence title) {
        super(BasedSequence.NULL);

        this.openingMarker = label.subSequence(0, 1);
        this.reference = label.subSequence(1, label.length() - 2).trim();
        this.closingMarker = label.subSequence(label.length() - 2, label.length());

        setUrlChars(url);

        if (title != null) {
            this.titleOpeningMarker = title.subSequence(0, 1);
            this.title = title.subSequence(1, title.length() - 1);
            this.titleClosingMarker = title.subSequence(title.length() - 1, title.length());
        }
        setCharsFromContent();
    }

    public BasedSequence getOpeningMarker() {
        return openingMarker;
    }

    public void setOpeningMarker(BasedSequence openingMarker) {
        this.openingMarker = openingMarker;
    }

    public BasedSequence getClosingMarker() {
        return closingMarker;
    }

    public void setClosingMarker(BasedSequence closingMarker) {
        this.closingMarker = closingMarker;
    }

    public BasedSequence getUrlOpeningMarker() {
        return urlOpeningMarker;
    }

    public void setUrlOpeningMarker(BasedSequence urlOpeningMarker) {
        this.urlOpeningMarker = urlOpeningMarker;
    }

    public BasedSequence getUrlClosingMarker() {
        return urlClosingMarker;
    }

    public void setUrlClosingMarker(BasedSequence urlClosingMarker) {
        this.urlClosingMarker = urlClosingMarker;
    }

    public BasedSequence getTitleOpeningMarker() {
        return titleOpeningMarker;
    }

    public void setTitleOpeningMarker(BasedSequence titleOpeningMarker) {
        this.titleOpeningMarker = titleOpeningMarker;
    }

    public BasedSequence getTitleClosingMarker() {
        return titleClosingMarker;
    }

    public void setTitleClosingMarker(BasedSequence titleClosingMarker) {
        this.titleClosingMarker = titleClosingMarker;
    }

    public BasedSequence getReference() {
        return reference;
    }

    public void setReference(BasedSequence reference) {
        this.reference = reference;
    }

    public BasedSequence getUrl() {
        return url;
    }

    public void setUrl(BasedSequence url) {
        this.url = url;
    }

    public BasedSequence getPageRef() {
        return pageRef;
    }

    public void setPageRef(BasedSequence pageRef) {
        this.pageRef = pageRef;
    }

    public BasedSequence getAnchorMarker() {
        return anchorMarker;
    }

    public void setAnchorMarker(BasedSequence anchorMarker) {
        this.anchorMarker = anchorMarker;
    }

    public BasedSequence getAnchorRef() {
        return anchorRef;
    }

    public void setAnchorRef(BasedSequence anchorRef) {
        this.anchorRef = anchorRef;
    }

    public BasedSequence getTitle() {
        return title;
    }

    public void setTitle(BasedSequence title) {
        this.title = title;
    }

    @NotNull
    @Override
    protected String toStringAttributes() {
        return "reference=" + reference + ", url=" + url;
    }
}

        return new BasedSequence[] {
                openingMarker,
                reference,
                closingMarker,
                PrefixedSubSequence.prefixOf(" ", closingMarker.getEmptySuffix()),
                urlOpeningMarker,
                pageRef,
                anchorMarker,
                anchorRef,
                urlClosingMarker,
                titleOpeningMarker,
                title,
                titleClosingMarker
        };
    
<methods>public void <init>() ,public void <init>(com.vladsch.flexmark.util.sequence.BasedSequence) ,public com.vladsch.flexmark.util.sequence.BasedSequence getAnchorMarker() ,public com.vladsch.flexmark.util.sequence.BasedSequence getAnchorRef() ,public com.vladsch.flexmark.util.sequence.BasedSequence getPageRef() ,public com.vladsch.flexmark.util.sequence.BasedSequence getTitle() ,public com.vladsch.flexmark.util.sequence.BasedSequence getTitleClosingMarker() ,public com.vladsch.flexmark.util.sequence.BasedSequence getTitleOpeningMarker() ,public com.vladsch.flexmark.util.sequence.BasedSequence getUrl() ,public com.vladsch.flexmark.util.sequence.BasedSequence getUrlClosingMarker() ,public com.vladsch.flexmark.util.sequence.BasedSequence getUrlOpeningMarker() ,public void setAnchorMarker(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setAnchorRef(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setPageRef(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setTitle(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setTitleChars(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setTitleClosingMarker(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setTitleOpeningMarker(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setUrl(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setUrlChars(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setUrlClosingMarker(com.vladsch.flexmark.util.sequence.BasedSequence) ,public void setUrlOpeningMarker(com.vladsch.flexmark.util.sequence.BasedSequence) <variables>protected com.vladsch.flexmark.util.sequence.BasedSequence anchorMarker,protected com.vladsch.flexmark.util.sequence.BasedSequence anchorRef,protected com.vladsch.flexmark.util.sequence.BasedSequence pageRef,protected com.vladsch.flexmark.util.sequence.BasedSequence title,protected com.vladsch.flexmark.util.sequence.BasedSequence titleClosingMarker,protected com.vladsch.flexmark.util.sequence.BasedSequence titleOpeningMarker,protected com.vladsch.flexmark.util.sequence.BasedSequence url,protected com.vladsch.flexmark.util.sequence.BasedSequence urlClosingMarker,protected com.vladsch.flexmark.util.sequence.BasedSequence urlOpeningMarker