Example #1
0
 public StoreList searchToSort(String storeKey, String value, String sortKey) {
   StoreList result = this.search(storeKey, value);
   if (result.size() == 0) {
     return null;
   } else {
     result.sort(sortKey);
     return result;
   }
 }
Example #2
0
 public StoreList search(String storeKey, String value) {
   StoreList result = new StoreList();
   String[] keys = this.getKeys();
   for (int i = 0; i < this.size(); i++) {
     Store temp = this.getStore(i);
     if (temp.containsKey(storeKey)) {
       if (value.equals(temp.getString(storeKey))) {
         result.add(keys[i]);
       }
     }
   }
   if (result.size() == 0) {
     return null;
   } else {
     return result;
   }
 }