Guava HashMultimap - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava HashMultimap class.

This code example shows how to use the following methods:get
  } 
 
  @SuppressWarnings("unchecked") 
  @Override 
  public <T> Collection<T> instantiateAllImplementers(Class<T> interfaceClass, Object... parameter) {
    Set<T> objects = (Set<T>) objectsForInterfaces.get(interfaceClass);
    return new ArrayList<>(objects);
  } 
 
  public void add(Class<?> interfaceClass, Object instance) {
    objectsForInterfaces.put(interfaceClass, instance);
  } 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:get
	 * Get valid completions for a prefix <var>key</var> 
	 * @param key 
	 * @return a possibly empty set of completions 
	 */ 
	public Set<String> getCompletions(String key) {
		return compoundBuiltins.get(key);
	} 
	 
	/** 
	 * Get valid prefixes 
	 */ 
	public Set<String> getPrefixes() {
		return prefixes;
	} 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:put
     * @param value the value  
     */ 
    public void put(K key, V value) {
 
        m_forwardMap.put(key, value);
        m_reverseMap.put(value, key);
 
    } 
 
    /** 
     * Removes the entry with the given key.<p> 
     *  
     * @param key the key  
     */ 
    public void remove(K key) {
 
        V removedValue = m_forwardMap.remove(key);
        if (removedValue != null) {
            m_reverseMap.remove(removedValue, key);
        } 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:get
        cache.put(entityId, leas);
        inverse.put(leaId, entityId);
    } 
 
    public Set<String> ancestorEdorgs(String edorgId) {
        return inverse.get(edorgId);
    } 
 
    /** 
     * Gets the set of LEAs associated with the entity. 
     *  
     * @param entityId 
     * @return The set of leas for the specified entity id 
     */ 
    public Set<String> getEntriesById(String entityId) {
        if (!cache.containsKey(entityId)) {
            return new HashSet<String>();
        } 
        return cache.get(entityId);
    } 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Guava HashMultimap Methods: