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

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

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

MultiMap.values介绍

暂无

代码示例

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

/**
 * Test for a specific single value in the map.
 * <p>
 * NOTE: This is a SLOW operation, and is actively discouraged.
 * @param value the value to search for
 * @return true if contains simple value
 */
public boolean containsSimpleValue(V value)
{
  for (List<V> vals : values())
  {
    if ((vals.size() == 1) && vals.contains(value))
    {
      return true;
    }
  }
  return false;
}

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

/**
 * Get the already parsed parts.
 * @return the parts that were parsed
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<List<Part>> values = _parts.values();
  List<Part> parts = new ArrayList<>();
  for (List<Part> o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Parse, if necessary, the multipart data and return the list of Parts.
 *
 * @return the parts
 * @throws IOException if unable to get the parts
 */
public Collection<Part> getParts()
throws IOException
{
  if(!_parsed)
    parse();
  throwIfError();
  
  Collection<List<Part>> values = _parts.values();
  List<Part> parts = new ArrayList<>();
  for (List<Part> o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * @return whether the list of parsed parts is empty
 */
public boolean isEmpty()
{
  if (_parts == null)
    return true;
  
  Collection<List<Part>> values = _parts.values();
  for (List<Part> partList : values)
  {
    if (partList.size() != 0)
      return false;
  }
  
  return true;
}

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

/**
 * @return whether the list of parsed parts is empty
 */
public boolean isEmpty()
{
  if (_parts == null)
    return true;
  
  Collection<List<Part>> values = _parts.values();
  for (List<Part> partList : values)
  {
    if (partList.size() != 0)
      return false;
  }
  
  return true;
}

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

/**
 * Test for a specific single value in the map.
 * <p>
 * NOTE: This is a SLOW operation, and is actively discouraged.
 * @param value
 * @return
 */
public boolean containsSimpleValue(V value)
{
  for (List<V> vals : values())
  {
    if ((vals.size() == 1) && vals.contains(value))
    {
      return true;
    }
  }
  return false;
}

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

/**
 * Test for a specific single value in the map.
 * <p>
 * NOTE: This is a SLOW operation, and is actively discouraged.
 * @param value
 * @return
 */
public boolean containsSimpleValue(V value)
{
  for (List<V> vals : values())
  {
    if ((vals.size() == 1) && vals.contains(value))
    {
      return true;
    }
  }
  return false;
}

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

/**
 * Test for a specific single value in the map.
 * <p>
 * NOTE: This is a SLOW operation, and is actively discouraged.
 * @param value
 * @return true if contains simple value
 */
public boolean containsSimpleValue(V value)
{
  for (List<V> vals : values())
  {
    if ((vals.size() == 1) && vals.contains(value))
    {
      return true;
    }
  }
  return false;
}

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

/**
 * Get the already parsed parts.
 * 
 * @return
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<Object> values = _parts.values();
  List<Part> parts = new ArrayList<Part>();
  for (Object o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Get the already parsed parts.
 * 
 * @return
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<Object> values = _parts.values();
  List<Part> parts = new ArrayList<Part>();
  for (Object o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Get the already parsed parts.
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<List<Part>> values = _parts.values();
  List<Part> parts = new ArrayList<Part>();
  for (List<Part> o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Get the already parsed parts.
 *
 * @return the parts that were parsed
 */
@Deprecated
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  
  Collection<List<Part>> values = _parts.values();
  List<Part> parts = new ArrayList<>();
  for (List<Part> o : values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Get the already parsed parts.
 * 
 * @return
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<Object> values = _parts.values();
  List<Part> parts = new ArrayList<Part>();
  for (Object o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Get the already parsed parts.
 * @return the parts that were parsed
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<List<Part>> values = _parts.values();
  List<Part> parts = new ArrayList<>();
  for (List<Part> o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Get the already parsed parts.
 * 
 * @return
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<Object> values = _parts.values();
  List<Part> parts = new ArrayList<Part>();
  for (Object o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Get the already parsed parts.
 * 
 * @return
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<Object> values = _parts.values();
  List<Part> parts = new ArrayList<Part>();
  for (Object o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Get the already parsed parts.
 * 
 * @return
 */
public Collection<Part> getParsedParts()
{
  if (_parts == null)
    return Collections.emptyList();
  Collection<Object> values = _parts.values();
  List<Part> parts = new ArrayList<Part>();
  for (Object o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

代码示例来源:origin: stackoverflow.com

MultiMap mhm = new MultiHashMap();
for ( string line: array) {
  String []pair = line.split(" ");
  mhm.put(pair[0],pair[1]);
}

for (Collection coll = (Collection) mhm.values() ) {
 //print all values from collection?
}

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

/**
 * Parse, if necessary, the multipart data and return the list of Parts.
 * 
 * @return
 * @throws IOException
 * @throws ServletException
 */
public Collection<Part> getParts()
throws IOException, ServletException
{
  parse();
  Collection<Object> values = _parts.values();
  List<Part> parts = new ArrayList<Part>();
  for (Object o: values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

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

/**
 * Parse, if necessary, the multipart data and return the list of Parts.
 *
 * @return the parts
 * @throws IOException if unable to get the parts
 */
public Collection<Part> getParts() throws IOException
{
  if (!_parsed)
    parse();
  throwIfError();
  
  Collection<List<Part>> values = _parts.values();
  List<Part> parts = new ArrayList<>();
  for (List<Part> o : values)
  {
    List<Part> asList = LazyList.getList(o, false);
    parts.addAll(asList);
  }
  return parts;
}

相关文章