@ SuppressWarnings ( "unchecked" ) private < T > Callback < T > getFirstCallback ( BeanMessageID type ) { List < Callback < ? > > callbacks = beanCallbacks . get ( type ) ; if ( callbacks == null || callbacks . isEmpty ( ) ) { Log . w ( TAG , "Got response without callback!" ) ; return null ; } return ( Callback < T > ) callbacks . remove ( 0 ) ; }
Get the first callback for a Bean message type .