git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated coding rules.
[utils]
/
support
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
conditions
/
PropertyRegexCondition.java
diff --git
a/support/general/src/main/java/org/wamblee/conditions/PropertyRegexCondition.java
b/support/general/src/main/java/org/wamblee/conditions/PropertyRegexCondition.java
index 2ce7a0e9700196116f1c74fc56c0a7fefdb361e9..cfc1e1655784c203699f2d4d6b10f71082cf0b39 100644
(file)
--- a/
support/general/src/main/java/org/wamblee/conditions/PropertyRegexCondition.java
+++ b/
support/general/src/main/java/org/wamblee/conditions/PropertyRegexCondition.java
@@
-33,17
+33,17
@@
public class PropertyRegexCondition<T> implements Condition<T> {
/**
* Property name.
*/
/**
* Property name.
*/
- private String
_
property;
+ private String property;
/**
* Regular expression.
*/
/**
* Regular expression.
*/
- private Pattern
_
regex;
+ private Pattern regex;
/**
* Whether or not to convert the value to lowercase before matching.
*/
/**
* Whether or not to convert the value to lowercase before matching.
*/
- private boolean
_
tolower;
+ private boolean tolower;
/**
* Constructs the condition.
/**
* Constructs the condition.
@@
-52,9
+52,9
@@
public class PropertyRegexCondition<T> implements Condition<T> {
* @param aTolower Whether or not to convert the value to lowercase before matching.
*/
public PropertyRegexCondition(String aProperty, String aRegex, boolean aTolower) {
* @param aTolower Whether or not to convert the value to lowercase before matching.
*/
public PropertyRegexCondition(String aProperty, String aRegex, boolean aTolower) {
-
_
property = aProperty;
-
_
regex = Pattern.compile(aRegex);
-
_
tolower = aTolower;
+ property = aProperty;
+ regex = Pattern.compile(aRegex);
+ tolower = aTolower;
}
/* (non-Javadoc)
}
/* (non-Javadoc)
@@
-62,11
+62,11
@@
public class PropertyRegexCondition<T> implements Condition<T> {
*/
public boolean matches(T aObject) {
try {
*/
public boolean matches(T aObject) {
try {
- String value = PropertyUtils.getProperty(aObject,
_
property) + "";
- if (
_
tolower ) {
+ String value = PropertyUtils.getProperty(aObject, property) + "";
+ if ( tolower ) {
value = value.toLowerCase();
}
value = value.toLowerCase();
}
- Matcher matcher =
_
regex.matcher(value);
+ Matcher matcher = regex.matcher(value);
return matcher.matches();
} catch (IllegalAccessException e) {
throw new RuntimeException(e.getMessage(), e);
return matcher.matches();
} catch (IllegalAccessException e) {
throw new RuntimeException(e.getMessage(), e);