org.apache.kahadb.index
class: BTreeVisitor.AndVisitor [javadoc |
source]
java.lang.Object
org.apache.kahadb.index.BTreeVisitor.PredicateVisitor<Key, Value>
org.apache.kahadb.index.BTreeVisitor$AndVisitor
All Implemented Interfaces:
Predicate, BTreeVisitor
Methods from org.apache.kahadb.index.BTreeVisitor$PredicateVisitor: |
---|
matched, visit |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.kahadb.index.BTreeVisitor$AndVisitor Detail: |
public boolean isInterestedInKey(Key key) {
for (Predicate< Key > condition : conditions) {
if( !condition.isInterestedInKey(key) ) {
return false;
}
}
return true;
}
|
public boolean isInterestedInKeysBetween(Key first,
Key second) {
for (Predicate< Key > condition : conditions) {
if( !condition.isInterestedInKeysBetween(first, second) ) {
return false;
}
}
return true;
}
|
public String toString() {
StringBuilder sb = new StringBuilder();
boolean first=true;
for (Predicate< Key > condition : conditions) {
if( !first ) {
sb.append(" AND ");
}
first=false;
sb.append("(");
sb.append(condition);
sb.append(")");
}
return sb.toString();
}
|