test

发表文章
分类管理
相册管理
引用
评论管理


package net.jforum.util.bbcode;

import java.io.Serializable;

/**
 * Represents each bbcode.
 * 
 * @author Rafael Steil
 * @version $Id: BBCode.java,v 1.11 2006/08/23 02:13:55 rafaelsteil Exp $
 */
public class BBCode implements Serializable
{
	private String tagName = "";
	private String regex;
	private String replace;
	private boolean removQuotes;
	private boolean alwaysProcess;
	
	public BBCode() {}

	/**
	 * BBCode class constructor
	 * @param tagName The tag name we are going to match
	 * @param regex Regular expression relacted to the tag
	 * @param replace The replacement string
	 */
	public BBCode(String tagName, String regex, String replace)
	{
		this.tagName = tagName;
		this.regex = regex;
		this.replace = replace;
	}

	/**
	 * Gets the regex
	 * @return String witht the regex
	 */
	public String getRegex() 
	{
		return this.regex;
	}

	/**
	 * Gets the replacement string
	 * @return string with the replacement data
	 */
	public String getReplace() 
	{
		return this.replace;
	}

	/**
	 * Getst the tag name
	 * @return The tag name
	 */
	public String getTagName() 
	{
		return this.tagName;
	}
	
	public boolean removeQuotes()
	{
		return this.removQuotes;
	}

	/**
	 * Sets the regular expression associated to the tag
	 * @param regex Regular expression string
	 */
	public void setRegex(String regex) 
	{
		this.regex = regex;
	}

	/**
	 * Sets the replacement string, to be aplyied when matching the code
	 * @param replace The replacement string data
	 */
	public void setReplace(String replace) 
	{
		this.replace = replace;
	}

	/**
	 * Setst the tag name
	 * @param tagName The tag name
	 */
	public void setTagName(String tagName) 
	{
		this.tagName = tagName;
	}
	
	public void enableAlwaysProcess()
	{
		this.alwaysProcess = true;
	}
	
	public boolean alwaysProcess()
	{
		return this.alwaysProcess;
	}
	
	public void enableRemoveQuotes()
	{
		this.removQuotes = true;
	}
}

  • 做电子书
  • 博客设置


[url]收藏管理 [/url]
[flash=200,200][/flash]
论管理 a b
留言管理 a b
做电子书 a b

你可能感兴趣的:(.net,Flash)