org.fuin.utils4j.filter
Class RegExprPropertyFilter

java.lang.Object
  extended by org.fuin.utils4j.filter.PropertyFilter
      extended by org.fuin.utils4j.filter.RegExprPropertyFilter
All Implemented Interfaces:
Filter

public class RegExprPropertyFilter
extends PropertyFilter

Defines a filter with a regular expression on a property.


Constructor Summary
RegExprPropertyFilter(java.lang.String newPropertyName, java.lang.String pattern)
          Constructor with property and pattern.
 
Method Summary
 boolean complies(java.lang.Object obj)
          Checks if the argument complies with the condition of the filter.
 java.lang.String getPattern()
          Return the pattern.
 int getType()
          Returns the type of the matching.
 java.lang.String getTypeName()
          Returns the type name of the matching.
 void setType(int type)
          Sets the type of the matching.
 void setTypeName(java.lang.String typeName)
          Sets the type name of the matching.
 
Methods inherited from class org.fuin.utils4j.filter.PropertyFilter
getProperty, getPropertyName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExprPropertyFilter

public RegExprPropertyFilter(java.lang.String newPropertyName,
                             java.lang.String pattern)
Constructor with property and pattern.

Parameters:
newPropertyName - Name of the property.
pattern - Pattern to use (Cannot be NULL!)
Method Detail

complies

public final boolean complies(java.lang.Object obj)
Checks if the argument complies with the condition of the filter.

Parameters:
obj - Object to be tested for compliance
Returns:
If object complies TRUE else FALSE is returned.

getType

public final int getType()
Returns the type of the matching.

Returns:
Type (0,1,2)

setType

public final void setType(int type)
Sets the type of the matching.

Parameters:
type - Type (0,1,2)

getTypeName

public final java.lang.String getTypeName()
Returns the type name of the matching.

Returns:
Type name ("matches", "lookingAt" or "find")

setTypeName

public final void setTypeName(java.lang.String typeName)
Sets the type name of the matching.

Parameters:
typeName - Type name ("matches", "lookingAt" or "find")

getPattern

public final java.lang.String getPattern()
Return the pattern.

Returns:
Pattern


Copyright © 2009 Future Invent Informationsmanagement GmbH. All Rights Reserved.