com.ds.fw.utils
Class FwRegularExpression

java.lang.Object
  |
  +--com.ds.fw.utils.FwRegularExpression

public class FwRegularExpression
extends java.lang.Object

I am a simple wrapper for the regular expression logic provided by OroInc.


Field Summary
 com.oroinc.text.regex.PatternCompiler compiler
           
 com.oroinc.text.regex.PatternMatcher matcher
           
 int options
           
 com.oroinc.text.regex.Pattern pattern
           
 
Constructor Summary
FwRegularExpression()
           
 
Method Summary
 boolean contains(java.lang.String s)
          Determine if the current pattern contains this string.
 com.oroinc.text.regex.PatternCompiler getCompiler()
           
 com.oroinc.text.regex.PatternMatcher getMatcher()
           
 com.oroinc.text.regex.Pattern getPattern()
           
 java.lang.String getResultGroup(int i)
           
 java.util.Vector getResultGroups()
          Return the collection of Strings that are the portions of the match inside parenthesis in the expression.
 boolean isValid(java.lang.String s)
          Determine if a regular expression in string fomrat can be parsed into a Pattern.
 boolean matches(java.lang.String s)
          Determine if the current pattern can be used for a complete match of this string.
 boolean matches(java.lang.String s, java.lang.String p)
           
 void setCaseSensitive(boolean b)
           
 void setCompiler(com.oroinc.text.regex.PatternCompiler o)
           
 void setMatcher(com.oroinc.text.regex.PatternMatcher o)
           
 void setPattern(com.oroinc.text.regex.Pattern o)
           
 void setPattern(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compiler

public com.oroinc.text.regex.PatternCompiler compiler

matcher

public com.oroinc.text.regex.PatternMatcher matcher

pattern

public com.oroinc.text.regex.Pattern pattern

options

public int options
Constructor Detail

FwRegularExpression

public FwRegularExpression()
Method Detail

getCompiler

public com.oroinc.text.regex.PatternCompiler getCompiler()

setCompiler

public void setCompiler(com.oroinc.text.regex.PatternCompiler o)

getMatcher

public com.oroinc.text.regex.PatternMatcher getMatcher()

setMatcher

public void setMatcher(com.oroinc.text.regex.PatternMatcher o)

getPattern

public com.oroinc.text.regex.Pattern getPattern()

setPattern

public void setPattern(com.oroinc.text.regex.Pattern o)

setPattern

public void setPattern(java.lang.String s)

setCaseSensitive

public void setCaseSensitive(boolean b)

getResultGroups

public java.util.Vector getResultGroups()
Return the collection of Strings that are the portions of the match inside parenthesis in the expression.


getResultGroup

public java.lang.String getResultGroup(int i)

matches

public boolean matches(java.lang.String s)
Determine if the current pattern can be used for a complete match of this string.


matches

public boolean matches(java.lang.String s,
                       java.lang.String p)

contains

public boolean contains(java.lang.String s)
Determine if the current pattern contains this string.


isValid

public boolean isValid(java.lang.String s)
Determine if a regular expression in string fomrat can be parsed into a Pattern.