List of usage examples for com.google.common.collect ImmutableMap copyOf
public static <K, V> ImmutableMap<K, V> copyOf(Iterable<? extends Entry<? extends K, ? extends V>> entries)
From source file:com.github.fge.jsonschema.processors.data.SchemaDigest.java
public SchemaDigest(final SchemaContext context, final Map<String, JsonNode> map) { this.context = context; digested = ImmutableMap.copyOf(map); }
From source file:com.streamsets.pipeline.stage.destination.kudu.KuduRecordConverter.java
public KuduRecordConverter(Map<String, Field.Type> columnsToFieldTypes, Map<String, String> fieldsToColumns, Schema schema) {//from www . jav a 2 s . co m this.columnsToFieldTypes = ImmutableMap.copyOf(columnsToFieldTypes); this.fieldsToColumns = ImmutableMap.copyOf(fieldsToColumns); this.schema = schema; }
From source file:org.marketcetera.core.instruments.StaticInstrumentFunctionSelector.java
/** * Creates an instance.// w ww .j a v a2 s. c om * * @param inClass the instrument function handler class. Cannot be null. */ public StaticInstrumentFunctionSelector(Class<T> inClass) { Validate.notNull(inClass, "class"); //$NON-NLS-1$ mClass = inClass; Map<Class<?>, T> handlers = new HashMap<Class<?>, T>(); ServiceLoader<T> loader = ServiceLoader.load(inClass); for (T t : loader) { handlers.put(t.getInstrumentType(), t); } SLF4JLoggerProxy.debug(this, "Available handlers {}", handlers); //$NON-NLS-1$ mHandlers = ImmutableMap.copyOf(handlers); }
From source file:com.facebook.swift.service.puma.swift.ReadQueryInfoTimeString.java
@ThriftConstructor public ReadQueryInfoTimeString(String name, String startTime, String endTime, int numSteps, Map<String, String> filter, List<String> selectList) { this.name = name; this.startTime = startTime; this.endTime = endTime; this.numSteps = numSteps; if (filter != null) { this.filter = ImmutableMap.copyOf(filter); } else {//ww w. j av a 2 s . c om this.filter = ImmutableMap.of(); } if (selectList != null) { this.selectList = ImmutableList.copyOf(selectList); } else { this.selectList = ImmutableList.of(); } }
From source file:me.lucko.luckperms.common.config.keys.MapKey.java
@Override public Map<String, String> get(LuckPermsConfiguration config) { return ImmutableMap.copyOf(config.getMap(path, ImmutableMap.of())); }
From source file:com.github.fge.uritemplate.vars.VariableMap.java
VariableMap(final VariableMapBuilder builder) { vars = ImmutableMap.copyOf(builder.vars); }
From source file:com.isotrol.impe3.pms.core.obj.StartedConnectors.java
/** * Constructor./* w w w. j a v a2s. c o m*/ * @param connectors Instantiated connectors. * @param connectorStopList Stop list. */ StartedConnectors(Map<UUID, StartedModule<?>> connectors, List<StartedModule<?>> connectorStopList) { this.connectors = ImmutableMap.copyOf(connectors); this.connectorStopList = ImmutableList.copyOf(connectorStopList); }
From source file:brooklyn.basic.BrooklynTypeSnapshot.java
protected BrooklynTypeSnapshot(String name, Map<String, ConfigKey<?>> configKeys) { this.name = name; this.configKeys = ImmutableMap.copyOf(configKeys); this.configKeysSet = ImmutableSet.copyOf(this.configKeys.values()); }
From source file:org.onosproject.provider.lldp.impl.SuppressionRules.java
public SuppressionRules(Set<DeviceId> suppressedDevice, Set<Device.Type> suppressedType, Map<String, String> suppressedAnnotation) { this.suppressedDevice = ImmutableSet.copyOf(suppressedDevice); this.suppressedDeviceType = ImmutableSet.copyOf(suppressedType); this.suppressedAnnotation = ImmutableMap.copyOf(suppressedAnnotation); }
From source file:org.apache.helix.task.TaskStateModelFactory.java
public TaskStateModelFactory(HelixManager manager, Map<String, TaskFactory> taskFactoryRegistry) { _manager = manager;/*from w w w.ja v a 2 s . co m*/ _taskFactoryRegistry = ImmutableMap.copyOf(taskFactoryRegistry); _taskStateModels = Lists.newLinkedList(); }