예제 #1
0
 public Trinity<List<LookupElement>, Iterable<List<LookupElement>>, Boolean> getModelSnapshot() {
   synchronized (lock) {
     final List<LookupElement> sorted = new ArrayList<LookupElement>(mySortedItems);
     final Iterable<List<LookupElement>> groups = myRelevanceClassifier.classify(sorted);
     boolean changed = lastAccess != stamp;
     lastAccess = stamp;
     return Trinity.create(sorted, groups, changed);
   }
 }
예제 #2
0
 public List<LookupElement> classifyByRelevance(List<LookupElement> list) {
   synchronized (lock) {
     return ContainerUtil.flatten(myRelevanceClassifier.classify(list));
   }
 }