public List<IAgent> getAgents() { // Return as a List but also ensures the caller cannot modify return new List<IAgent>(agents); }