Back to project page MarkdownView.
The source code is released under:
Apache License
If you think the Android project MarkdownView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.petebevin.markdown; /*from w ww . ja v a2 s. co m*/ public class HTMLToken { private boolean isTag; private String text; private HTMLToken(boolean tag, String value) { isTag = tag; text = value; } public static HTMLToken tag(String text) { return new HTMLToken(true, text); } public static HTMLToken text(String text) { return new HTMLToken(false, text); } /** * @return <code>true</code> if this is a tag, <code>false</code> if it's text. */ public boolean isTag() { return isTag; } public String getText() { return text; } @Override public String toString() { String type; if (isTag()) { type = "tag"; } else { type = "text"; } return type + ": " + getText(); } }