@param map [Hash<String, RDF::Vocabulary::Term>]

 @param value [Object] the value to enrich

 @return [DPLA::MAP::Controlled::DCMIType, nil] the matching DCMI Type
   term. `nil` if no matches are found.
771577
def enrich_value(value)
      return value unless value.is_a? String

      match = @map.fetch(value.downcase) { most_similar(value) }
      return value if match.nil?
      dcmi = DPLA::MAP::Controlled::DCMIType.new(match)
      dcmi.prefLabel = match.label
      dcmi
    end
769184
public void addValueToIn(Object value, String name, Map<String, Object> map) {
        Object val = getValue(map, name);
         if (val instanceof Collection) {
             Object cleanValue = getCleanValue(value);
             ((Collection) val).add(cleanValue);
         } else if (val == null) {
             setValueForIn(value, name + "[0]", map);
         } else {
            throw new SlimFixtureException(false, "name is not a list but: " + val.getClass().getSimpleName());
         }
    }
1279921
@SuppressWarnings("unchecked")
  public static <K, V> MultiValueMap<K, V> unmodifiableMultiValueMap(
      final MultiValueMap<? extends K, ? extends V> map) {
    Assert.notNull(map, "'map' must not be null");
    final Map<K, List<V>> result = new LinkedHashMap<>(map.size());
    map.forEach((key, value) -> {
      final List<? extends V> values = Collections.unmodifiableList(value);
      result.put(key, (List<V>) values);
    });
    final Map<K, List<V>> unmodifiableMap = Collections.unmodifiableMap(result);
    return CollectionUtils.toMultiValueMap(unmodifiableMap);
  }
919007
public int getIntValueFromMap( RandomIter map ) {
        try {
            if (map == null) {
                return HMConstants.intNovalue;
            }
            int value = map.getSample(col, row, 0);
            return value;
        } catch (Exception e) {
            // ignore and return novalue
            return HMConstants.intNovalue;
        }
    }
913012
def contains_value(self, value):
        
        check_not_none(value, "value can't be None")
        value_data = self._to_data(value)
        return self._encode_invoke(map_contains_value_codec, value=value_data)
175763
def enrich_value(value)
      return value unless value.is_a? ActiveTriples::Resource
      deduplicate_resource(value)
      value
    end
1195964
static Map<String, Object> valueAsMap(Map<String, Object> map, Key key, Map<String, Object> defaultValue) {
        if (map.containsKey(key.key)) {
            Object rawOrMap = map.get(key.key);
            if (rawOrMap instanceof Map) {
                @SuppressWarnings("unchecked")
                Map<String, Object> submap = (Map<String, Object>) rawOrMap;
                return submap;
            } else {
                return defaultValue;
            }
        }
        return defaultValue;
    }
472200
private static ImmutableMap<IRI, VocabularyEntry> extractVocabulary(@Nonnull Mapping mapping) {
		return mapping.getRDFAtomPredicates().stream()
				.filter(p -> p instanceof TriplePredicate)
				.map(p -> (TriplePredicate) p)
				.findFirst()
				.map(p -> extractTripleVocabulary(mapping, p)
						.collect(ImmutableCollectors.toMap(e -> e.name, e -> e)))
				.orElseGet(ImmutableMap::of);
    }
1131849
public static ValueMap map(Object... map) {
        if (map.length / 2 * 2 != map.length)
            throw new IllegalArgumentException("Arguments should be <String> key - <?> value pairs");

        Builder builder = new Builder();
        for (int i = 0; i < map.length; i += 2)
            builder.put((String)map[i], map[i + 1]);

        return builder.build();
    }
1333278
def enrich_value(value)
      return value unless value.is_a?(ActiveTriples::Resource) &&
                          value.respond_to?(:providedLabel)

      construct_results(value)
    end
1184723
public void parseMember(Map map) {
    String key = T.getString();
    check(TokenType.STRING, "a string");
    check(TokenType.COLON, ":");
    Object val = parseValue();
    map.put(key, val);
  }
782717
def convert(input, values = {})
      @map.inject(input) do |current, (pattern, expander)|
        params = pattern.params(current)
        params &&= Hash[values.merge(params).map { |k,v| [k.to_s, v] }]
        expander.expandable?(params) ? expander.expand(params) : current
      end
    end
1054940
public static MultiValueMap asMultiValueMap(final String key, final Object value) {
        return org.springframework.util.CollectionUtils.toMultiValueMap(wrap(key, value));
    }
286861
public void copyValuesFromTo(Map<String, Object> otherMap, Map<String, Object> map) {
        getMapHelper().copyValuesFromTo(otherMap, map);
    }
427432
private static InputMapping<Object> createInputMapping( Object value ){
        if( value instanceof String ){
            String text = (String)value;
            if( ElUtil.hasBrackets( text ) ){
                return new ExpressionLanguageMapping<Object>( text );
            }
        }
        return ConstantMapping.of( value );
    }
700102
def _map(value, istart, istop, ostart, ostop):
    
    return ostart + (ostop - ostart) * ((value - istart) / (istop - istart))
1241768
public static Map<String, Object> toMap(String value) {
		Map<String, Object> result = toNullableMap(value);
		return result != null ? result : new HashMap<String, Object>();
	}