@Encoding.Naming(value = "putEntry*", depluralize = true) @Encoding.Init void putEntry( final Tuple2<K, V> entry) { this.map = this.map.put(entry); }
public Builder putEntryOptionalAttributes(Tuple2<SMFAttributeName, SMFSchemaAttribute> entry) { this.optionalAttributes_map = this.optionalAttributes_map.put(entry); return this; }
public Builder putOptionalAttributes(SMFAttributeName key, SMFSchemaAttribute value) { this.optionalAttributes_map = this.optionalAttributes_map.put(key, value); return this; }
public Builder putOptionalAttributes(SMFAttributeName key, SMFSchemaAttribute value) { this.optionalAttributes_map = this.optionalAttributes_map.put(key, value); return this; }
@Encoding.Naming(standard = Encoding.StandardNaming.PUT) @Encoding.Init void put( final K key, final V value) { this.map = this.map.put(key, value); }
public Builder putRequiredAttributes(SMFAttributeName key, SMFSchemaAttribute value) { this.requiredAttributes_map = this.requiredAttributes_map.put(key, value); return this; }
public Builder putEntryRequiredAttributes(Tuple2<SMFAttributeName, SMFSchemaAttribute> entry) { this.requiredAttributes_map = this.requiredAttributes_map.put(entry); return this; }
public Builder putRequiredAttributes(SMFAttributeName key, SMFSchemaAttribute value) { this.requiredAttributes_map = this.requiredAttributes_map.put(key, value); return this; }
public Builder putEntryRequiredAttributes(Tuple2<SMFAttributeName, SMFSchemaAttribute> entry) { this.requiredAttributes_map = this.requiredAttributes_map.put(entry); return this; }
public Builder putEntryOptionalAttributes(Tuple2<SMFAttributeName, SMFSchemaAttribute> entry) { this.optionalAttributes_map = this.optionalAttributes_map.put(entry); return this; }
/** * @return The attributes by name */ @Value.Derived default SortedMap<SMFAttributeName, SMFAttribute> attributesByName() { SortedMap<SMFAttributeName, SMFAttribute> m = TreeMap.empty(); final List<SMFAttribute> ordered = this.attributesInOrder(); for (int index = 0; index < ordered.size(); ++index) { final SMFAttribute attr = ordered.get(index); if (m.containsKey(attr.name())) { final StringBuilder sb = new StringBuilder(128); sb.append("Duplicate attribute name."); sb.append(System.lineSeparator()); sb.append(" Attribute: "); sb.append(attr.name().value()); sb.append(System.lineSeparator()); throw new IllegalArgumentException(sb.toString()); } m = m.put(attr.name(), attr); } return m; }
/** * @return A module resolver */ public static SMFFilterCommandModuleResolverType create() { SortedMap<String, SMFFilterCommandModuleType> modules = TreeMap.empty(); final ServiceLoader<SMFFilterCommandModuleProviderType> providers = ServiceLoader.load(SMFFilterCommandModuleProviderType.class); final Iterator<SMFFilterCommandModuleProviderType> iter = providers.iterator(); while (iter.hasNext()) { final SMFFilterCommandModuleProviderType provider = iter.next(); final SortedMap<String, SMFFilterCommandModuleType> available = provider.available(); for (final String name : available.keySet()) { final SMFFilterCommandModuleType module = available.get(name).get(); if (modules.containsKey(name)) { LOG.warn("multiple modules with the same name: {}", name); } if (LOG.isDebugEnabled()) { LOG.debug("registered module {} via provider {}", name, provider); } modules = modules.put(name, module); } } return new SMFFilterCommandModuleResolver(modules); }
/** * @return The attributes by name */ @Value.Derived default SortedMap<SMFAttributeName, SMFAttribute> attributesByName() { SortedMap<SMFAttributeName, SMFAttribute> m = TreeMap.empty(); final List<SMFAttribute> ordered = this.attributesInOrder(); for (int index = 0; index < ordered.size(); ++index) { final SMFAttribute attr = ordered.get(index); if (m.containsKey(attr.name())) { final StringBuilder sb = new StringBuilder(128); sb.append("Duplicate attribute name."); sb.append(System.lineSeparator()); sb.append(" Attribute: "); sb.append(attr.name().value()); sb.append(System.lineSeparator()); throw new IllegalArgumentException(sb.toString()); } m = m.put(attr.name(), attr); } return m; }
protected SMFFilterCommandModuleProviderAbstract( final SMFFilterCommandModuleType... in_modules) { NullCheck.notNull(in_modules, "Modules"); SortedMap<String, SMFFilterCommandModuleType> m = TreeMap.empty(); for (int index = 0; index < in_modules.length; ++index) { final SMFFilterCommandModuleType module = in_modules[index]; if (m.containsKey(module.name())) { throw new IllegalArgumentException( "Duplicate published module: " + module.name()); } m = m.put(module.name(), module); } this.available = m; }