ImageSectionHeader (String name) { for (ImageSectionHeader header : mySectionHeaders) { if (name.equals(header.getSectionName())) { return header; } } throw new IllegalStateException("Cannot find section with name " + name); }