jvmMain.com.apollographql.apollo.api.internal.UnmodifiableMapBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-api Show documentation
Show all versions of apollo-api Show documentation
Apollo GraphQL API classes
package com.apollographql.apollo.api.internal;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
public class UnmodifiableMapBuilder {
private final Map map;
public UnmodifiableMapBuilder(int initialCapacity) {
this.map = new LinkedHashMap<>(initialCapacity);
}
public UnmodifiableMapBuilder() {
this.map = new LinkedHashMap<>();
}
public UnmodifiableMapBuilder put(K key, V value) {
map.put(key, value);
return this;
}
public Map build() {
return Collections.unmodifiableMap(map);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy