Interface ResidentList
- All Known Implementing Classes:
Government
,Nation
,Town
public interface ResidentList
Represents an object capable of storing residents within it.
-
Method Summary
Modifier and TypeMethodDescriptionGets the unmodifiable list of outlaws.Returns an unmodifiable list of residents.boolean
hasResident
(String name) Whether a given object contains a resident.
-
Method Details
-
getResidents
Collection<Resident> getResidents()Returns an unmodifiable list of residents.- Returns:
- The list of residents in this object.
-
hasResident
Whether a given object contains a resident.- Parameters:
name
- The name of the resident.- Returns:
true
if found,false
otherwise.
-
getOutlaws
Collection<Resident> getOutlaws()Gets the unmodifiable list of outlaws.- Returns:
- The list of outlaws in this object.
-