Correctly log how many prisoners were loaded.

This commit is contained in:
graywolf336
2014-04-28 22:46:41 -05:00
parent 998c7bd824
commit 0981fe659f
2 changed files with 18 additions and 5 deletions

View File

@ -154,6 +154,21 @@ public class JailManager {
return this.jails.get(name) != null;
}
/**
* Gets all the prisoners in the system, best for a system wide count of the prisoners or accessing all the prisoners at once.
*
* @return HashSet of Prisoners.
*/
public HashSet<Prisoner> getAllPrisoners() {
HashSet<Prisoner> prisoners = new HashSet<Prisoner>();
for(Jail j : jails.values()) {
prisoners.addAll(j.getAllPrisoners());
}
return prisoners;
}
/**
* Gets the {@link Jail jail} the given prisoner is in.
*