コード例 #1
0
 /**
  * Returns if the storage is closed.
  *
  * @param storageData Storage to check.
  * @return True if storage is closed, in any other situation false.
  */
 public boolean isStorageClosed(StorageData storageData) {
   for (StorageData existing : existingStoragesSet) {
     if (existing.getId().equals(storageData.getId())) {
       return existing.isStorageClosed();
     }
   }
   return false;
 }
コード例 #2
0
 /**
  * Returns list of readable storages.
  *
  * @return Returns list of readable storages.
  */
 public List<StorageData> getReadableStorages() {
   List<StorageData> list = new ArrayList<StorageData>();
   for (StorageData storageData : existingStoragesSet) {
     if (storageData.isStorageClosed()) {
       list.add(storageData);
     }
   }
   return list;
 }