code: public void registerBuilder(int type, ADStructureBuilder builder)
      {
          if (type < 0 || 0xFF < type)
          {
              String message = String.format("'type' is out of the valid range: %d", type);
              throw new IllegalArgumentException(message);
          }
  
          if (builder == null)
          {
              return;
          }
  
          // Use the AD type as the key for the builder.
          Integer key = Integer.valueOf(type);
  
          // Get the existing list of builders for the AD type.
          List<ADStructureBuilder> builders = mBuilders.get(key);
  
          // If no builder has been registered for the AD type yet.
          if (builders == null)
          {
              builders = new ArrayList<ADStructureBuilder>();
              mBuilders.put(key, builders);
          }
  
          // Register the builder at the beginning of the builder list.
          builders.add(0, builder);
      }
docs: Register an AD structure builder for the AD type. The given builder
  is added at the beginning of the list of the builders for the AD type.
  
  <p>
  Note that a builder for the type <i>Manufacturer Specific Data</i>
  (0xFF) should not be registered by this method. Instead, use
  {@link #registerManufacturerSpecificBuilder(int,
  ADManufacturerSpecificBuilder)}.
  </p>
  
  @param type
  AD type. The value must be in the range from 0 to 0xFF.
  
  @param builder
  AD structure builder.