/** * Adds the given registry to this builder. * * @param jsonParsableRegistry the registry to be added. * @return this builder instance to allow Method Chaining. * @throws NullPointerException if {@code jsonParsableRegistry} is {@code null}. */ public MappingStrategiesBuilder add( @Nonnull final JsonParsableRegistry<? extends Jsonifiable> jsonParsableRegistry) { checkNotNull(jsonParsableRegistry, "jsonParsableRegistry"); final Set<String> types = jsonParsableRegistry.getTypes(); for (final String type : types) { strategies.put(type, jsonParsableRegistry::parse); } return this; }
/** * Adds the given registry to this builder. * * @param jsonParsableRegistry the registry to be added. * @return this builder instance to allow Method Chaining. * @throws NullPointerException if {@code jsonParsableRegistry} is {@code null}. */ public MappingStrategiesBuilder add( @Nonnull final JsonParsableRegistry<? extends Jsonifiable> jsonParsableRegistry) { checkNotNull(jsonParsableRegistry, "jsonParsableRegistry"); final Set<String> types = jsonParsableRegistry.getTypes(); for (final String type : types) { strategies.put(type, jsonParsableRegistry::parse); } return this; }