public void registerManufacturerSpecificBuilder ( int companyId , ADManufacturerSpecificBuilder builder ) { if ( companyId < 0 || 0xFFFF < companyId ) { String message = String . format ( "'companyId' is out of the valid range: %d" , companyId ) ; throw new IllegalArgumentException ( message ) ; } if ( builder == null ) { return ; } // Use the company ID as the key for the builder. Integer key = Integer . valueOf ( companyId ) ; // Get the existing list of builders for the company ID. List < ADManufacturerSpecificBuilder > builders = mMSBuilders . get ( key ) ; // If no builder has been registered for the company ID yet. if ( builders == null ) { builders = new ArrayList < ADManufacturerSpecificBuilder > ( ) ; mMSBuilders . put ( key , builders ) ; } // Register the builder at the beginning of the builder list. builders . add ( 0 , builder ) ; }
Register a builder for the company ID . The given builder is added at the beginning of the list of the builders for the company ID .