Map containsValue - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Map containsValue method.

This code example shows how to use the following methods:containsValue
        return loadSourceIfNeeded().containsKey(key);
    } 
 
    @Override 
    public boolean containsValue(Object value) {
        return loadSourceIfNeeded().containsValue(value);
    } 
 
    @Override 
    public Set keySet() {
        return loadSourceIfNeeded().keySet();
    } 
 
    @Override 
    public Collection values() {
        return loadSourceIfNeeded().values();
    } 
 
    @Override 
    public Set entrySet() {
8
CodeRank
This code example shows how to use the following methods:containsKey, containsValue, get, size
        return map;
    } 
 
    @Override 
    protected void validate(Map<String, String> before, Map<String, String> after) {
        super.validate(before, after);
        validate(before);
        validate(after);
    } 
 
    private static void validate(Map<String, String> map) {
        switch (map.size()) {
        case 3: 
            validate(map, null, "null-value");
            validate(map, "key", "value");
            validate(map, "key-null", null);
            break; 
        case 4: 
            validate(map, null, null);
            validate(map, "key", "value");

8
CodeRank
This code example shows how to use the following methods:containsValue
        return map.containsKey(key);
    } 
 
    @Override 
    public boolean containsValue(Object value) {
        return map.containsValue(value);
    } 
 
    public T put(Long key, T value) {
        return map.put(key, value);
    } 
 
    public T putIfAbsent(Long key, T value) {
        return map.putIfAbsent(key, value);
    } 
 
    public void putAll(Map<? extends Long, ? extends T> m) {
        map.putAll(m);
    } 
 
7
CodeRank
This code example shows how to use the following methods:containsValue, put
 
    public void registerSubHandler(String subName, 
                                   ShellCommandHandler handler) 
        throws ShellCommandInitException { 
 
        if (!itsSubHandlerMap.containsValue(handler)) {
            // Only init the handler if it has not been added yet. 
            // We do this because a single handler could be 
            // registered for multiple subName's (as in the case  
            // of aliasing). 
            handler.init(getCommandName() + " " + subName, getShell());
        } 
 
        itsSubHandlerMap.put(subName, handler);
    } 
 
    public void processCommand(String[] args) 
        throws ShellCommandUsageException, ShellCommandExecException  
    { 
        String cmdName = getCommandName();
7
CodeRank
This code example shows how to use the following methods:containsValue
    return underlying.containsKey(k);
  } 
 
  @Override 
  public boolean containsValue(final Object o) {
    boolean underlyingContains = underlying.containsValue(OObjectEntitySerializer.serializeFieldValue(deserializeClass, o));
    return underlyingContains || super.containsValue(o);
  } 
 
  @Override 
  public Object put(final Object iKey, final Object e) {
    setDirty(); 
    underlying.put(iKey, OObjectEntitySerializer.serializeFieldValue(deserializeClass, e));
    return super.put(iKey, e);
  } 
 
  @Override 
  public Object remove(final Object iKey) {
    underlying.remove((String) iKey);
    setDirty(); 
7
CodeRank
This code example shows how to use the following methods:containsValue
    public boolean containsKey(Object key) {
        return map.containsKey(key);
    } 
 
    public boolean containsValue(Object value) {
        return map.containsValue(value);
    } 
 
    public V put(K key, V value) {
        return map.put(key, value);
    } 
 
    public V remove(Object key) {
        return map.remove(key);
    } 
 
    public void putAll(Map<? extends K, ? extends V> m) {
        map.putAll(m);
    } 
 
7
CodeRank
This code example shows how to use the following methods:containsKey, containsValue
    return oldValue;
  } 
 
  @Override 
  public void putAll(Map<? extends K, ? extends V> m) {
    if (m.containsKey(null) || m.containsValue(null))
      throw new IllegalArgumentException("Key or value may not be null");
 
    mapNoCopy().putAll(m);
  } 
   
  @Override 
  public V remove(Object key) {
    return removeObjectForKey(key);
  } 
} 
7
CodeRank
This code example shows how to use the following methods:containsValue
    return underlying.containsKey(k);
  } 
 
  @Override 
  public boolean containsValue(final Object o) {
    boolean underlyingContains = underlying.containsValue(o.toString());
    return underlyingContains || super.containsValue(o);
  } 
 
  @Override 
  public Object put(final Object iKey, final Object e) {
    setDirty(); 
    underlying.put(iKey, ((TYPE) e).name());
    return super.put(iKey, e);
  } 
 
  @Override 
  public Object remove(final Object iKey) {
    underlying.remove((String) iKey);
    setDirty(); 
7
CodeRank
This code example shows how to use the following methods:setAccuracy
 
        resume(); 
 
        Map<PendingIntent, Criteria> locationPendingIntents = shadowLocationManager
                .getRequestLocationUdpateCriteriaPendingIntents(); 
        Criteria criteria = new Criteria();
        criteria.setAccuracy(Criteria.ACCURACY_FINE);
 
        sendBatteryLevelChangedBroadcast(100); 
 
        Intent intent = new Intent(Intent.ACTION_BATTERY_OKAY);
        shadowApp.sendBroadcast(intent);
 
        assertThat("Updates from " + LocationManager.GPS_PROVIDER
                + " provider should be requested when battery power is okay!", 
                locationPendingIntents.containsValue(criteria));
    } 
 
    @Test 
    public void shouldDismissWaitForFixDialogWhenLocationIsAvailable() { 
        shadowLocationManager.setLastKnownLocation(LocationManager.GPS_PROVIDER, null);
8
CodeRank
This code example shows how to use the following methods:containsValue
  } 
 
  @Override 
  public boolean containsValue(final Object value)
  { 
    return _data.containsValue(value);
  } 
 
  @Override 
  public V get(final Object key)
  { 
    return _data.get(key);
  } 
 
  @Override 
  public V put(final K key, final V value)
  { 
    return _data.put(key, value);
  } 
 
7
CodeRank
containsValue Method Overview
Returns true if this map maps one or more keys to the specified value.
See Code Examples for other Java 8 Map Methods: