@Override
public boolean matchItem(Object item) {
- String text = null;
+ String textTitleCache = null;
+ String abbrevTitleCache = null;
if(item instanceof UuidAndTitleCache){
if (((UuidAndTitleCache) item).getAbbrevTitleCache() != null){
- text = ((UuidAndTitleCache) item).getAbbrevTitleCache();
- } else{
- text = ((UuidAndTitleCache) item).getTitleCache();
+ abbrevTitleCache = ((UuidAndTitleCache) item).getAbbrevTitleCache();
+ }
+ if (((UuidAndTitleCache) item).getTitleCache() != null ){
+ textTitleCache = ((UuidAndTitleCache) item).getTitleCache();
}
}else if(item instanceof String){
- text = (String) item;
+ textTitleCache = (String) item;
}
- return text != null ? matches(text) : false;
+
+ return (matches(textTitleCache) || matches(abbrevTitleCache)) ;
+
}
};