org.restlet.util.Series.removeFirst()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(141)

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

Series.removeFirst介绍

[英]Removes from this list the first entry whose name equals the specified name ignoring the case.
[中]从该列表中删除名称等于指定名称的第一个条目,忽略大小写。

代码示例

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Removes from this list the first entry whose name equals the specified
 * name ignoring the case.
 * 
 * @param name
 *            The name of the entries to be removed (case sensitive).
 * @return false if no entry has been removed, true otherwise.
 */
public boolean removeFirst(String name) {
  return removeFirst(name, false);
}

代码示例来源:origin: org.restlet/org.restlet

/**
 * Removes from this list the first entry whose name equals the specified
 * name ignoring the case.
 * 
 * @param name
 *            The name of the entries to be removed (case sensitive).
 * @return false if no entry has been removed, true otherwise.
 */
public boolean removeFirst(String name) {
  return removeFirst(name, false);
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

/**
 * Removes from this list the first entry whose name equals the specified
 * name ignoring the case.
 * 
 * @param name
 *            The name of the entries to be removed (case sensitive).
 * @return false if no entry has been removed, true otherwise.
 */
public boolean removeFirst(String name) {
  return removeFirst(name, false);
}

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

/**
 * Manipulate Restlet response headers.
 *
 * This implementation removes the Date and Server headers normally added by Restlet.
 *
 * @param response
 */
@Override
protected void addResponseHeaders(final HttpResponse response) {
 super.addResponseHeaders(response);
 final Series<Parameter> responseHeaders = response.getHttpCall()
   .getResponseHeaders();
 // our servlet container is adding a Date header for all responses
 // duplicate Date headers are not allowed by HTTP spec
 responseHeaders.removeFirst("Date");
 // Nexus is in charge of setting the main Server header
 // Restlet would normally add another Server header instead of amending existing one with all products as values
 responseHeaders.removeFirst("Server");
}

相关文章