Lines Matching full:builder
120 // looking for of() with > 5 entries? Use the builder instead.
123 * Returns a new builder. The generated builder is equivalent to the builder
124 * created by the {@link Builder} constructor.
126 public static <K, V> Builder<K, V> builder() {
127 return new Builder<K, V>();
142 * A builder for creating immutable map instances, especially {@code public
146 * new ImmutableMap.Builder<String, Integer>()
155 * <p>Builder instances can be reused - it is safe to call {@link #build}
159 public static class Builder<K, V> {
163 * Creates a new builder. The returned builder is equivalent to the builder
164 * generated by {@link ImmutableMap#builder}.
166 public Builder() {}
172 public Builder<K, V> put(K key, V value) {
183 public Builder<K, V> putAll(Map<? extends K, ? extends V> map) {
368 Builder<Object, Object> builder = new Builder<Object, Object>();
369 return createMap(builder);
371 Object createMap(Builder<Object, Object> builder) {
373 builder.put(keys[i], values[i]);
375 return builder.build();