Properly output how many cells were loaded, hopefully this has something

to do with #26 displaying incorrect information.
This commit is contained in:
graywolf336
2014-05-02 01:35:04 -05:00
parent b8dc15decb
commit b3033913c7
2 changed files with 18 additions and 6 deletions

View File

@ -155,6 +155,20 @@ public class JailManager {
return this.jails.get(name) != null;
}
/**
* Gets all the {@link Cell cells} in the jail system, best for system wide count of the cells or touching each cell.
*
* @return HashSet of all the Cells.
*/
public HashSet<Cell> getAllCells() {
HashSet<Cell> cells = new HashSet<Cell>();
for(Jail j : jails.values())
cells.addAll(j.getCells());
return cells;
}
/**
* Gets all the prisoners in the system, best for a system wide count of the prisoners or accessing all the prisoners at once.
*
@ -163,9 +177,8 @@ public class JailManager {
public HashSet<Prisoner> getAllPrisoners() {
HashSet<Prisoner> prisoners = new HashSet<Prisoner>();
for(Jail j : jails.values()) {
for(Jail j : jails.values())
prisoners.addAll(j.getAllPrisoners());
}
return prisoners;
}