Package org.fastily.jwiki.core
Class WParser.WikiText
java.lang.Object
org.fastily.jwiki.core.WParser.WikiText
- Enclosing class:
- WParser
public static class WParser.WikiText extends Object
Mutable representation of parsed wikitext. May contain Strings and templates.
- Author:
- Fastily
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
append(Object o)
Appends an Object to this WikiText object.ArrayList<WParser.WTemplate>
getTemplates()
Find top-level WTemplates contained by this WikiTextArrayList<WParser.WTemplate>
getTemplatesR()
Recursively finds WTemplate objects contained by this WikiText.String
toString()
Render this WikiText object as a String.String
toString(boolean doTrim)
Render this WikiText as a String.
-
Constructor Details
-
WikiText
Creates a new WikiText object- Parameters:
objects
- Any Objects to pre-load this WikiText object with. Acceptable values are of type String or WTemplate.
-
-
Method Details
-
append
Appends an Object to this WikiText object.- Parameters:
o
- The Object to append. Acceptable values are of type String or WTemplate.
-
getTemplates
Find top-level WTemplates contained by this WikiText- Returns:
- A List of top-level WTemplates in this WikiText.
-
getTemplatesR
Recursively finds WTemplate objects contained by this WikiText.- Returns:
- A List of all WTemplate objects in this WikiText.
-
toString
Render this WikiText object as a String. Trims whitespace by default. -
toString
Render this WikiText as a String.- Parameters:
doTrim
- If true, then trim whitespace.- Returns:
- A String representation of this WikiText.
-