public boolean intersects(AnchorText other) {
if(!hasValidDocumentList() || !other.hasValidDocumentList()) {
return false;
}
if(getSize() < other.getSize()) {
IntIterator iterator = documentList.iterator();
while(iterator.hasNext()) {
if(other.containsDocument(iterator.next())) {
return true;
}
}
} else {
IntIterator iterator = other.documentList.iterator();
while(iterator.hasNext()) {
if(documentList.contains(iterator.next())) {
return true;
}
}
}
return false;