View Javadoc

1   package com.atlassian.user.search;
2   
3   import com.atlassian.user.search.page.Pager;
4   
5   import java.util.HashMap;
6   import java.util.Set;
7   
8   public abstract class AbstractSearchResult implements SearchResult
9   {
10      protected HashMap<String, Pager> repositoriesToResults = new HashMap<String, Pager>();
11  
12      public void addToResults(String repositoryKey, Pager pager)
13      {
14          repositoriesToResults.put(repositoryKey, pager);
15      }
16  
17      public Pager pager(String repoKey)
18      {
19          return repositoriesToResults.get(repoKey);
20      }
21  
22      /**
23       * @return a list of {@link String} objects indcating the repositories with results in this
24       *         object.
25       */
26      public Set repositoryKeyset()
27      {
28          return repositoriesToResults.keySet();
29      }
30  }