Guava ArrayListMultimap - 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 ArrayListMultimap class.

This code example shows how to use the following methods:containsKey, get
		return Multimaps.unmodifiableMultimap(restricted);
	} 
 
	@Override 
	public List<String> getVisibleContainerHandles(String handle) {
		if(restricted.containsKey(handle))
			return Collections.unmodifiableList(restricted.get(handle));
 
		// super method returns all containers 
		return super.getVisibleContainerHandles(handle);
	} 
} 
5
CodeRank
This code example shows how to use the following methods:containsEntry, put
  /** 
   * Adds the given value to the values currently associated with the given key, iff the key isn't 
   * already associated with that same value. 
   */ 
  public void putIfAbsent(String key, Object value) {
    if (!fields.containsEntry(key, value)) {
      fields.put(key, value);
    } 
  } 
   
  @Override 
  public boolean equals(Object other) { 
    if (other instanceof Record) { 
      return fields.equals(((Record)other).getFields()); 
    } 
    return false; 
  } 
 
  @Override 
  public int hashCode() { 
4
CodeRank
This code example shows how to use the following methods:containsEntry, put
  /** 
   * Adds the given value to the values currently associated with the given key, iff the key isn't 
   * already associated with that same value. 
   */ 
  public void putIfAbsent(String key, Object value) {
    if (!fields.containsEntry(key, value)) {
      fields.put(key, value);
    } 
  } 
   
  @Override 
  public boolean equals(Object other) { 
    if (other instanceof Record) { 
      return fields.equals(((Record)other).getFields()); 
    } 
    return false; 
  } 
 
  @Override 
  public int hashCode() { 
4
CodeRank
This code example shows how to use the following methods:size
	} 
 
	@Override 
	public int size() 
	{ 
		return _nameToConstructors.size(); 
	} 
 
	@Override 
	public Collection<Constructor<T>> values() 
	{ 
		return Collections.unmodifiableCollection(_nameToConstructors.values()); 
	} 
 
	/*--------------- 
	 * Local methods 
	 */ 
 
	/** 
	 * Adds entry for specified class. 
2
CodeRank
This code example shows how to use the following methods:put
            mc = FMLCommonHandler.instance().findContainerFor(sourceMod);
        } 
        if (mc != null && Loader.isModLoaded(modTarget))
        { 
            message.setSender(mc);
            modMessages.put(modTarget, message);
        } 
    } 
 
    /** 
     * Retrieve any pending runtime messages for the mod 
     * @param forMod The {@link Instance} of the Mod to fetch messages for 
     * @return any messages - the collection will never be null 
     */ 
    public static ImmutableList<IMCMessage> fetchRuntimeMessages(Object forMod)
    { 
        ModContainer mc = FMLCommonHandler.instance().findContainerFor(forMod);
        if (mc != null)
        { 
            return ImmutableList.copyOf(modMessages.removeAll(mc.getModId()));
3
CodeRank
This code example shows how to use the following methods:put
    } 
 
    public void add(final String remoteURL, final ChangedRef changeResult) {
        checkNotNull(remoteURL);
        checkNotNull(changeResult);
        changedRefs.put(remoteURL, changeResult);
    } 
 
    public void addAll(final String remoteURL, final List<ChangedRef> changes) {
        checkNotNull(remoteURL);
        checkNotNull(changes);
        for (ChangedRef cr : changes) {
            checkNotNull(cr);
        } 
        changedRefs.putAll(remoteURL, changes);
    } 
 
    @Override 
    public String toString() {
        return Objects.toStringHelper(TransferSummary.class) //
4
CodeRank
See Code Examples for Guava ArrayListMultimap Methods: