git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
support
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
conditions
/
AndCondition.java
diff --git
a/support/general/src/main/java/org/wamblee/conditions/AndCondition.java
b/support/general/src/main/java/org/wamblee/conditions/AndCondition.java
index 50898739d53da345c2b8143e8f98fbf8a2aa28b2..6618c659da0cf25019e04a06bd8c160b0ecb7b7d 100644
(file)
--- a/
support/general/src/main/java/org/wamblee/conditions/AndCondition.java
+++ b/
support/general/src/main/java/org/wamblee/conditions/AndCondition.java
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 2005 the original author or authors.
+ * Copyright 2005
-2010
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-13,7
+13,6
@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.wamblee.conditions;
import java.util.ArrayList;
package org.wamblee.conditions;
import java.util.ArrayList;
@@
-21,12
+20,12
@@
import java.util.List;
/**
* Represents a logical and of different boolean conditions.
/**
* Represents a logical and of different boolean conditions.
- *
+ *
* @author Erik Brakkee
* @author Erik Brakkee
+ *
*/
public class AndCondition<T> implements Condition<T> {
*/
public class AndCondition<T> implements Condition<T> {
-
- private List<Condition<T>> _conditions;
+ private List<Condition<T>> conditions;
/**
* Constructs the condition.
/**
* Constructs the condition.
@@
-37,9
+36,9
@@
public class AndCondition<T> implements Condition<T> {
* Second condition.
*/
public AndCondition(Condition<T> aCondition1, Condition<T> aCondition2) {
* Second condition.
*/
public AndCondition(Condition<T> aCondition1, Condition<T> aCondition2) {
-
_
conditions = new ArrayList<Condition<T>>();
-
_
conditions.add(aCondition1);
-
_
conditions.add(aCondition2);
+ conditions = new ArrayList<Condition<T>>();
+ conditions.add(aCondition1);
+ conditions.add(aCondition2);
}
/**
}
/**
@@
-49,21
+48,23
@@
public class AndCondition<T> implements Condition<T> {
* List of conditions to use in the logical and.
*/
public AndCondition(List<Condition<T>> aConditions) {
* List of conditions to use in the logical and.
*/
public AndCondition(List<Condition<T>> aConditions) {
-
_
conditions = aConditions;
+ conditions = aConditions;
}
/*
* (non-Javadoc)
*
}
/*
* (non-Javadoc)
*
- * @see org.wamblee.crawler.kiss.ProgramMatcher#matches(org.wamblee.crawler.kiss.Program)
+ * @see
+ * org.wamblee.crawler.kiss.ProgramMatcher#matches(org.wamblee.crawler.kiss
+ * .Program)
*/
public boolean matches(T aObject) {
*/
public boolean matches(T aObject) {
- for (Condition<T> condition :
_
conditions) {
+ for (Condition<T> condition : conditions) {
if (!condition.matches(aObject)) {
return false;
}
}
if (!condition.matches(aObject)) {
return false;
}
}
+
return true;
}
return true;
}
-
}
}