// after the number of parts contained
// in this privilege is automatically implied, so return true
if (parts.size() - 1 < index) {
return true;
} else {
KeyValue part = parts.get(index);
// are the keys even equal
if(!part.getKey().equalsIgnoreCase(otherPart.getKey())) {
return false;
}
if (!impliesKeyValue(part, otherPart)) {
return false;
}
index++;
}
}
// If this privilege has more parts than
// the other parts, only imply it if
// all of the other parts are wildcards
for (; index < parts.size(); index++) {
KeyValue part = parts.get(index);
if (!part.getValue().equals(SearchConstants.ALL)) {
return false;
}
}
return true;