All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.florianingerl.util.regex.CaptureReplacer Maven / Gradle / Ivy

Go to download

This is a Regular Expressions library for Java. Compared to java.util.regex, it supports Recursive and Conditional Regular Expressions, Capture Trees and Plugins.

There is a newer version: 1.1.11
Show newest version
package com.florianingerl.util.regex;

/**
 * Used to replace all captures of capturing
 * groups recursively with a computed replacement string.
 * 
 * @author Florian Ingerl
 * @see Matcher#replaceAll(CaptureReplacer)
 */
public interface CaptureReplacer {

	/**
	 * Returns the whole input sequence
	 * 
	 * @return The whole input sequence
	 */
	public CharSequence getInput();

	/**
	 * Sets the whole input sequence
	 * 
	 * @param input
	 *            The whole input sequence
	 */
	public void setInput(CharSequence input);

	/**
	 * Computes the replacement string for the given {@link CaptureTreeNode}
	 * 
	 * @param node
	 *            The node to be replaced
	 * @return The replacement string for the given {@link CaptureTreeNode}
	 */
	public String replace(CaptureTreeNode node);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy