org.openbp.common.string.shellmatcher
Class MultiPattern

java.lang.Object
  extended by org.openbp.common.string.shellmatcher.MultiPattern
All Implemented Interfaces:
java.io.Serializable

public class MultiPattern
extends java.lang.Object
implements java.io.Serializable

A multi pattern defines a single search criteria for the MultiMatcher class.

Author:
Heiko Erhardt
See Also:
Serialized Form

Constructor Summary
MultiPattern()
          Default constructor.
MultiPattern(java.lang.String attributeName, java.lang.Object patternValue)
          Value constructor.
 
Method Summary
 void addPatternValue(java.lang.Object patternValue)
          Adds a pattern value.
 boolean match(java.lang.Object o)
          Determines if an object matches the pattern.
 void setAttributeName(java.lang.String attributeName)
          Sets the attribute name.
 void setExactMatch(boolean exactMatch)
          Sets the string matching strategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiPattern

public MultiPattern()
Default constructor.


MultiPattern

public MultiPattern(java.lang.String attributeName,
                    java.lang.Object patternValue)
Value constructor.

Parameters:
attributeName - Name of the attribute
patternValue - Pattern value
Method Detail

match

public boolean match(java.lang.Object o)
Determines if an object matches the pattern.

Parameters:
o - Object to match against the pattern
Returns:
true The object matches the pattern.
false The object does not match.

setAttributeName

public void setAttributeName(java.lang.String attributeName)
Sets the attribute name.


addPatternValue

public void addPatternValue(java.lang.Object patternValue)
Adds a pattern value.


setExactMatch

public void setExactMatch(boolean exactMatch)
Sets the string matching strategy.

Parameters:
exactMatch - true String matches must be exact matches.
false String must contain the pattern.


Copyright © 2011. All Rights Reserved.