Converts map element into an AnyValueMap or returns empty AnyValueMap if conversion is not possible.

        :param key: a key of element to get.

        :return: AnyValueMap value of the element or empty AnyValueMap if conversion is not supported.
320551
def get_as_map(self, key):
        
        value = self.get(key)
        return AnyValueMap.from_value(value)
100976
def _transform_key_value(self, key, value, map_dict):
        '''
        '''

        if key in self.tcl_list_patterns:
            value = self._parse_tcl_list(key, value)

        if key in map_dict:
            key = map_dict[key]

        return key, value
1149542
@SuppressWarnings("unchecked")
    private static Object getMappedValue(Object obj, Property property, Object key) {
        if (property == null) {
            throw new IllegalArgumentException("Cannot get the mapped value from a 'null' property.");
        }

        if (property.getType().isAssignableFrom(Map.class)) {
            Map<Object, Object> map = (Map<Object, Object>) property.get(obj);

            if (map == null) {
                throw new NullPointerException("Invalid 'null' value found for mapped " + property + " in "
                                                       + obj.getClass().getName() + ".");

            }

            return map.get(key);
        } else {
            throw new IllegalArgumentException("Cannot get a mapped value from the not mapped " + property
                                                       + ". Only Map type is supported, but " + property.getType().getSimpleName() + " found.");
        }
    }
962258
def key(value)
      if self.map? && @data.has_value?(value)
        @data.invert[value]
      elsif (self.map?  && @data.has_key?(value)) ||
            (self.list? && @data.include?(value))
        value
      else
        nil
      end
    end
96053
public final int get(String key)
  {

    for (int i = 0; i < m_firstFree; i++)
    {
      if (m_map[i].equals(key))
        return m_values[i];
    }

    return INVALID_KEY;
  }
1085516
public String getValueForDisplayValue(final String key) {
        if (mapDisplayValuesToValues.containsKey(key)) {
            return mapDisplayValuesToValues.get(key);
        }
        return key;
    }
1206306
public Value get(Object key) {
        /* If the length is under and we are asking for the key, then just look for the key. Don't build the map. */
        if (map == null && items.length < 20) {
            for (Object item : items) {
                MapItemValue miv = (MapItemValue) item;
                if (key.equals(miv.name.toValue())) {
                    return miv.value;
                }
            }
            return null;
        } else {
            if (map == null) buildIfNeededMap();
            return map.get(key);
        }
    }
1227501
def get_as_nullable_string(self, key):
        
        value = self.get(key)
        return StringConverter.to_nullable_string(value)
675887
def get(cls, key):
        
        if isinstance(key, Enum) and not isinstance(key, cls):
            raise TypeError("Cannot type cast between enums")
        if isinstance(key, int):
            if not int(key) in cls._values:
                raise KeyError("There is no enum with key %d" % key)
            return cls._values[key]
        if isinstance(key, (str, unicode)):
            if not key in cls._names:
                raise KeyError("There is no enum with name %s" % key)
            return cls._names[key]
        raise TypeError("Invalid enum key type: %s"
                         % (key.__class__.__name__))
172800
public Object get(String key)
    {
        if (key==null)
            return _nullValue;
        
        Map.Entry entry = getEntry(key,0,key.length());
        if (entry==null)
            return null;
        return entry.getValue();
    }
384832
def get_as_map(self, key):
        
        if key == None:
            map = {}
            for (k, v) in self.items():
                map[k] = v
            return map
        else:
            value = self.get(key)
            return MapConverter.to_map(value)
754188
def get(self, key: str, default: Any = DEFAULT):
        
        if default is self.DEFAULT:
            try:
                value = self.params.get(key)
            except KeyError:
                raise ConfigurationError("key \"{}\" is required at location \"{}\"".format(key, self.history))
        else:
            value = self.params.get(key, default)
        return self._check_is_dict(key, value)
815468
def get_optional(self, key: str,
                     default: Optional[Any] = None) -> Optional[Any]:
        
        return self.state.get(key, default)
743657
@SuppressWarnings("unchecked")
  public <T> T getRequiredValue(String key) {

    T value = (T) map.get(key);
    if (value == null) {
      throw new RequiredParameterException();
    }
    return value;
  }
1369843
def get(self, key: Any, default: Any=None) -> Any:
        ''''''

        return self.data.get(key, default)
681558
public Optional<String> get(String key) {
    return Optional.ofNullable(flagsMap.get(key));
  }
610915
@SuppressWarnings("unchecked")
    public Object getValueOfMap(final Object key, final Object targetObj) {
        ArgUtils.notNull(targetObj, "targetObj");
        
        if(!Map.class.isAssignableFrom(targetType)) {
            throw new IllegalStateException("this method cannot call Map. This target type is " + targetType.getName());
        }
        
        final Map<Object, Object> map = (Map<Object, Object>) getValue(targetObj);
        if(map == null) {
            return null;
        }
        
        return map.get(key);
        
    }