public static < T extends Header > T getHeader ( final Header [ ] hdrs , short id ) { if ( hdrs == null ) return null ; for ( Header hdr : hdrs ) { if ( hdr == null ) return null ; if ( hdr . getProtId ( ) == id ) return ( T ) hdr ; } return null ; }
Returns the header associated with an ID