org.eclipse.jetty.util.MultiMap.addValues()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中org.eclipse.jetty.util.MultiMap.addValues()方法的一些代码示例,展示了MultiMap.addValues()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.addValues()方法的具体详情如下:
包路径:org.eclipse.jetty.util.MultiMap
类名称:MultiMap
方法名:addValues

MultiMap.addValues介绍

[英]Add values to multi valued entry. If the entry is single valued, it is converted to the first value of a multi valued entry.
[中]向多值项添加值。如果条目是单值条目,则会将其转换为多值条目的第一个值。

代码示例

代码示例来源:origin: org.eclipse.jetty/jetty-util

/**
 * Merge values.
 * 
 * @param map
 *            the map to overlay on top of this one, merging together values if needed.
 * @return true if an existing key was merged with potentially new values, false if either no change was made, or there were only new keys.
 */
public boolean addAllValues(MultiMap<V> map)
{
  boolean merged = false;
  if ((map == null) || (map.isEmpty()))
  {
    // done
    return merged;
  }
  for (Map.Entry<String, List<V>> entry : map.entrySet())
  {
    String name = entry.getKey();
    List<V> values = entry.getValue();
    if (this.containsKey(name))
    {
      merged = true;
    }
    this.addValues(name,values);
  }
  return merged;
}

代码示例来源:origin: jenkinsci/winstone

/**
 * Merge values.
 * 
 * @param map
 *            the map to overlay on top of this one, merging together values if needed.
 * @return true if an existing key was merged with potentially new values, false if either no change was made, or there were only new keys.
 */
public boolean addAllValues(MultiMap<V> map)
{
  boolean merged = false;
  if ((map == null) || (map.isEmpty()))
  {
    // done
    return merged;
  }
  for (Map.Entry<String, List<V>> entry : map.entrySet())
  {
    String name = entry.getKey();
    List<V> values = entry.getValue();
    if (this.containsKey(name))
    {
      merged = true;
    }
    this.addValues(name,values);
  }
  return merged;
}

代码示例来源:origin: Nextdoor/bender

/**
 * Merge values.
 * 
 * @param map
 *            the map to overlay on top of this one, merging together values if needed.
 * @return true if an existing key was merged with potentially new values, false if either no change was made, or there were only new keys.
 */
public boolean addAllValues(MultiMap<V> map)
{
  boolean merged = false;
  if ((map == null) || (map.isEmpty()))
  {
    // done
    return merged;
  }
  for (Map.Entry<String, List<V>> entry : map.entrySet())
  {
    String name = entry.getKey();
    List<V> values = entry.getValue();
    if (this.containsKey(name))
    {
      merged = true;
    }
    this.addValues(name,values);
  }
  return merged;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Merge values.
 * 
 * @param the
 *            map to overlay on top of this one, merging together values if needed.
 * @return true if an existing key was merged with potentially new values, false if either no change was made, or there were only new keys.
 */
public boolean addAllValues(MultiMap<V> map)
{
  boolean merged = false;
  if ((map == null) || (map.isEmpty()))
  {
    // done
    return merged;
  }
  for (Map.Entry<String, List<V>> entry : map.entrySet())
  {
    String name = entry.getKey();
    List<V> values = entry.getValue();
    if (this.containsKey(name))
    {
      merged = true;
    }
    this.addValues(name,values);
  }
  return merged;
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Merge values.
 * 
 * @param the
 *            map to overlay on top of this one, merging together values if needed.
 * @return true if an existing key was merged with potentially new values, false if either no change was made, or there were only new keys.
 */
public boolean addAllValues(MultiMap<V> map)
{
  boolean merged = false;
  if ((map == null) || (map.isEmpty()))
  {
    // done
    return merged;
  }
  for (Map.Entry<String, List<V>> entry : map.entrySet())
  {
    String name = entry.getKey();
    List<V> values = entry.getValue();
    if (this.containsKey(name))
    {
      merged = true;
    }
    this.addValues(name,values);
  }
  return merged;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

parameterMap.addValues(parameterName, req.getParameterValues(parameterName));

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

Object value=entry.getValue();
if (value instanceof String[])
  params.addValues(entry.getKey(),(String[])value);
else
  params.add(entry.getKey(),value);

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

params.addValues(entry.getKey(), (String[])value);
else
  params.add(entry.getKey(), value);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

params.addValues(entry.getKey(), (String[])value);
else
  params.add(entry.getKey(), value);

相关文章