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

This code example shows how to use the following methods:entries, put, size
               sock);
      IOUtils.closeSocket(sock);
      return; 
    } 
 
    if (capacity == multimap.size()) {
      evictOldest(); 
    } 
    multimap.put(remoteAddr, sock);
  } 
 
  public synchronized int size() { 
    return multimap.size();
  } 
 
  /** 
   * Evict the oldest entry in the cache. 
   */ 
  private synchronized void evictOldest() { 
    Iterator<Entry<SocketAddress, Socket>> iter =

6
CodeRank
This code example shows how to use the following methods:get
   *     no value for {@code name}. If there are multiple values for the query 
   *     parameter, the first value is returned, where "first" is the first one 
   *     that appears when the query string is read left to right. 
   */ 
  public String getParam(String name) {
    List<String> values = params.get(name);
    return values.size() > 0 ? values.get(0) : null;
  } 
 
  /** 
   * @param name of a query parameter 
   * @return The value associated with the query parameter, or null if there is 
   *     no value for {@code name}. If there are multiple values for the query 
   *     parameter, the last value is returned, where "last" is the last one 
   *     that appears when the query string is read left to right. 
   */ 
  public String getLastValueForParam(String name) {
    List<String> values = params.get(name);
    return values.size() > 0 ? values.get(values.size() - 1) : null;
  } 
4
CodeRank
This code example shows how to use the following methods:removeAll
    return this;
  } 
 
  public Update value(String column, Object value) {
    mCustomExpressions.remove(column);
    mCustomExpressionsArgs.removeAll(column);
    Utils.addToContentValues(column, value, mValues);
    return this;
  } 
 
  @TargetApi(HONEYCOMB)
  public Update setColumn(String column, String expression) {
    mValues.remove(column);
    mCustomExpressionsArgs.removeAll(column);
    mCustomExpressions.put(column, "(" + expression + ")");
    return this;
  } 
 
  @TargetApi(HONEYCOMB)
  public Update setColumn(String column, Expression expression) {
4
CodeRank
See Code Examples for Guava LinkedListMultimap Methods: