1 16 17 package org.apache.jetspeed.services.search; 18 19 import java.util.ArrayList ; 20 import java.util.List ; 21 22 23 29 public class SearchResults 30 { 31 private List results = null; 32 33 35 public SearchResults() 36 { 37 init(0); 38 } 39 40 44 public SearchResults(int initialCapacity) 45 { 46 init(initialCapacity); 47 } 48 49 53 private void init(int initialCapacity) 54 { 55 results = new ArrayList (initialCapacity); 56 } 57 58 63 public boolean add(ParsedObject searchResult) 64 { 65 return results.add(searchResult); 66 } 67 68 73 public void add(int index, ParsedObject searchResult) 74 { 75 results.add(index, searchResult); 76 return; 77 } 78 79 84 public ParsedObject get(int index) 85 { 86 return(ParsedObject) results.get(index); 87 } 88 89 93 public int size() 94 { 95 return results.size(); 96 } 97 98 102 public List getResults() 103 { 104 return this.results; 105 } 106 } 107 | Popular Tags |