org.wamblee.conditions
Class PropertyRegexCondition<T>
java.lang.Object
org.wamblee.conditions.PropertyRegexCondition<T>
- All Implemented Interfaces:
- Condition<T>
public class PropertyRegexCondition<T>
- extends Object
- implements Condition<T>
Condition to check whether a given property of an object matches a certain
regular expression. The method name to use of the object passed in to
matches(Object) is obtained using the Javabean conventions.
- Author:
- Erik Brakkee
|
Method Summary |
boolean |
matches(T aObject)
Determines if an object matches a condition. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyRegexCondition
public PropertyRegexCondition(String aProperty,
String aRegex,
boolean aTolower)
- Constructs the condition.
- Parameters:
aProperty - Name of the property to examine.aRegex - Regular expression to use.aTolower - Whether or not to convert the value to lowercase before
matching.
matches
public boolean matches(T aObject)
- Description copied from interface:
Condition
- Determines if an object matches a condition.
- Specified by:
matches in interface Condition<T>
- Parameters:
aObject - object to match.
- Returns:
- True iff the object matches.
Copyright © 2011. All Rights Reserved.