Class WikiText.Token

    • Constructor Detail

      • Token

        public Token()
    • Method Detail

      • setEndOffset

        protected void setEndOffset​(int endOffset)
      • addFlattenedTokens

        protected void addFlattenedTokens​(WikiText.Token t)
      • getWikiText

        public WikiText getWikiText()
      • getText

        public String getText()
        returns the content as a String. All tokens will be rendered as their source text, without any html comments that were present in the wiki source. NOTE: the toString() method will return the wikiSource WITH comments and nowiki tags.
        Returns:
        a list of tokens (either text or wikiTokens)
      • fillText

        protected abstract void fillText​(StringBuilder s)
      • getFullContent

        public String getFullContent()
        returns the full source content that support the wikiText as its specified offsets.
        Returns:
        the MediaWiki source String
      • getBeginIndex

        public int getBeginIndex()
        get the index at which this token starts in its WikiText FullContent.
        Returns:
        the begin index, relative to the WikiText source content
      • getEndIndex

        public int getEndIndex()
        get the index at which this token ends in its WikiText FullContent.
        Returns:
        the end index, relative to the WikiText source content