public static Function < SipHeader , ? extends SipHeader > getFramer ( final Buffer b ) { // For headers that have the expected capitalization, do a quick case-sensitive // search. If that fails do a slower case-insensitive search. final Function < SipHeader , ? extends SipHeader > framer = framers . get ( b ) ; if ( framer != null ) { return framer ; } for ( Map . Entry < Buffer , Function < SipHeader , ? extends SipHeader > > entry : framers . entrySet ( ) ) { if ( entry . getKey ( ) . equalsIgnoreCase ( b ) ) { return entry . getValue ( ) ; } } return null ; }
For the given header name return a function that will convert a generic header instance into one with the correct subtype .