|
Java URL Optimization API (SEO API) 2.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.soleng.urlformatter.seo.RegexStringFormatter
public class RegexStringFormatter
A StringFormatter
that specifies a regular expression for
find/replace manipulations on strings. Uses the java.util.regex
package from the core Java libraries. Please consult the core Java
documentation for details on Java's regular expression capabilities.
Property Summary | ||
---|---|---|
Property | Type | Default Value |
pattern |
String |
null |
replacement |
String |
null |
replaceAll |
boolean |
true |
Constructor Summary | |
---|---|
RegexStringFormatter()
|
Method Summary | |
---|---|
java.lang.String |
format(com.endeca.soleng.urlformatter.UrlState pUrlState,
java.lang.String pString)
|
java.lang.String |
getPattern()
|
boolean |
getReplaceAll()
|
java.lang.String |
getReplacement()
|
void |
setPattern(java.lang.String pPattern)
Specifies a pattern to find and replace with the replacement value. |
void |
setReplaceAll(boolean pReplaceAll)
Specifies whether or not all matching patterns will be replaced. |
void |
setReplacement(java.lang.String pReplacement)
Specifies the replacement value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegexStringFormatter()
Method Detail |
---|
public java.lang.String getPattern()
public void setPattern(java.lang.String pPattern)
pPattern
- specifies pattern to be replaced.
If pPattern is "Wine Type", then any string or strings matching "Wine Type" will be found and replaced.public java.lang.String getReplacement()
public void setReplacement(java.lang.String pReplacement)
pReplacement
- replacement value. public boolean getReplaceAll()
public void setReplaceAll(boolean pReplaceAll)
pReplaceAll
- Specifies whether only the first matching instance, or all matching patterns will be replaced.
If the pattern is "te" and replacement is "t", and the string is "tetete",
the result if pReplaceAll
were set to true would be "ttt" and
the result if pReplaceAll
were set to false would be "ttete"public java.lang.String format(com.endeca.soleng.urlformatter.UrlState pUrlState, java.lang.String pString)
format
in interface StringFormatter
|
Java URL Optimization API (SEO API) 2.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@VERSION PRODUCT: Java URL Optimization API (SEO API) (urlFormatterSeo) VERSION: 2.1.1 BUILD: 12083DEV ARCH_OS: n/a DATE: 2012-02-16T20:40:10-0500