public Optional < SectionHeader > getSectionHeaderByName ( String name ) { for ( SectionHeader header : headers ) { if ( header . getName ( ) . equals ( name ) ) { return Optional . of ( header ) ; } } return Optional . absent ( ) ; }
Returns an optional of the first section that has the given name .