com.atlassian.renderer.v2
Class Replacer

java.lang.Object
  extended by com.atlassian.renderer.v2.Replacer

public class Replacer
extends Object

Helper class for performing repeated pattern replacement. Why you can't do this with just the JDK regex classes, I don't know.


Constructor Summary
Replacer(Pattern pattern, String replacement, String[] necessaryConstantParts)
          Replaces a pattern with a replacement.
 
Method Summary
 String replace(String str)
           
 String replaceAll(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Replacer

public Replacer(Pattern pattern,
                String replacement,
                String[] necessaryConstantParts)
Replaces a pattern with a replacement. Provided with an array of necessary constant parts. The substitution won't be attamepted if any of those are missing in the target String. This is a performance enhancement.

Parameters:
pattern -
replacement -
necessaryConstantParts -
Method Detail

replaceAll

public String replaceAll(String str)

replace

public String replace(String str)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.