// Path: segment/src/main/java/net/loomchild/segment/srx/LanguageRule.java
// public class LanguageRule {
// 
// 	private List<Rule> ruleList;
// 
// 	private String name;
// 
// 	/**
// 	 * Creates language rule.
// 	 * 
// 	 * @param name language rule name
// 	 * @param ruleList rule list (it will be shallow copied)
// 	 */
// 	public LanguageRule(String name, List<Rule> ruleList) {
// 		this.ruleList = new ArrayList<Rule>(ruleList);
// 		this.name = name;
// 	}
// 
// 	/**
// 	 * Creates empty language rule.
// 	 * 
// 	 * @param name language rule name
// 	 */
// 	public LanguageRule(String name) {
// 		this(name, new ArrayList<Rule>());
// 	}
// 
// 	/**
// 	 * @return unmodifiable rules list
// 	 */
// 	public List<Rule> getRuleList() {
// 		return Collections.unmodifiableList(ruleList);
// 	}
// 
// 	/**
// 	 * Adds rule to the end of rule list.
// 	 * @param rule
// 	 */
// 	public void addRule(Rule rule) {
// 		ruleList.add(rule);
// 	}
// 
// 	/**
// 	 * @return language rule name
// 	 */
// 	public String getName() {
// 		return name;
// 	}
// 
// }


import java.util.Iterator;
import java.util.List;
import net.loomchild.segment.srx.LanguageRule;
package net.loomchild.segment;




/**
 * Represents abstract text iterator. Responsible for implementing remove
 * operation.
 * 
 * @author loomchild
 * 
 */
public abstract class AbstractTextIterator implements TextIterator {

	/**
	 * {@inheritDoc}
	 */
	public void remove() {
		throw new UnsupportedOperationException(
				"Remove is not supported by TextIterator.");
	}

// Path: segment/src/main/java/net/loomchild/segment/srx/LanguageRule.java
// public class LanguageRule {
// 
// 	private List<Rule> ruleList;
// 
// 	private String name;
// 
// 	/**
// 	 * Creates language rule.
// 	 * 
// 	 * @param name language rule name
// 	 * @param ruleList rule list (it will be shallow copied)
// 	 */
// 	public LanguageRule(String name, List<Rule> ruleList) {
// 		this.ruleList = new ArrayList<Rule>(ruleList);
// 		this.name = name;
// 	}
// 
// 	/**
// 	 * Creates empty language rule.
// 	 * 
// 	 * @param name language rule name
// 	 */
// 	public LanguageRule(String name) {
// 		this(name, new ArrayList<Rule>());
// 	}
// 
// 	/**
// 	 * @return unmodifiable rules list
// 	 */
// 	public List<Rule> getRuleList() {
// 		return Collections.unmodifiableList(ruleList);
// 	}
// 
// 	/**
// 	 * Adds rule to the end of rule list.
// 	 * @param rule
// 	 */
// 	public void addRule(Rule rule) {
// 		ruleList.add(rule);
// 	}
// 
// 	/**
// 	 * @return language rule name
// 	 */
// 	public String getName() {
// 		return name;
// 	}
// 
// }


// Path: segment/src/main/java/net/loomchild/segment/AbstractTextIterator.java
import java.util.Iterator;
import java.util.List;
import net.loomchild.segment.srx.LanguageRule;

package net.loomchild.segment;




/**
 * Represents abstract text iterator. Responsible for implementing remove
 * operation.
 * 
 * @author loomchild
 * 
 */
public abstract class AbstractTextIterator implements TextIterator {

	/**
	 * {@inheritDoc}
	 */
	public void remove() {
		throw new UnsupportedOperationException(
				"Remove is not supported by TextIterator.");
	}

	public String toString(List<LanguageRule> languageRuleList) {