本文整理了Java中org.apache.commons.collections.MultiMap.clear()
方法的一些代码示例,展示了MultiMap.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.clear()
方法的具体详情如下:
包路径:org.apache.commons.collections.MultiMap
类名称:MultiMap
方法名:clear
暂无
代码示例来源:origin: org.jsmiparser/jsmiparser-util
public void clear() {
m_impl.clear();
}
代码示例来源:origin: org.apache.directory.shared/shared-ldap
/**
* Clear the RDN, removing all the AttributeTypeAndValues.
*/
public void clear()
{
atav = null;
atavs = null;
atavType = null;
atavTypes.clear();
nbAtavs = 0;
normName = "";
upName = "";
start = -1;
length = 0;
}
代码示例来源:origin: info.magnolia/magnolia-module-cache
@Override
public void reset() {
super.reset();
wrappedWriter = null;
status = SC_OK;
headers.clear();
// cleanup temp file if any
cleanUp();
}
代码示例来源:origin: net.jadler/jadler-core
/**
* Removes all occurrences of the given header in this stub response (using a case insensitive search)
* and sets its single value.
* @param name header name
* @param value header value
*/
@SuppressWarnings("unchecked")
void setHeaderCaseInsensitive(final String name, final String value) {
final MultiMap result = new MultiValueMap();
for (final Object o: this.headers.keySet()) {
final String key = (String) o; //fucking non-generics MultiMap
if (!name.equalsIgnoreCase(key)) {
//copy all other headers to the result multimap
for(final String s: (Collection<String>)this.headers.get(o)) {
result.put(o, s);
}
}
}
this.headers.clear();
this.headers.putAll(result);
this.addHeader(name, value);
}
代码示例来源:origin: jadler-mocking/jadler
/**
* Removes all occurrences of the given header in this stub response (using a case insensitive search)
* and sets its single value.
* @param name header name
* @param value header value
*/
@SuppressWarnings("unchecked")
void setHeaderCaseInsensitive(final String name, final String value) {
final MultiMap result = new MultiValueMap();
for (final Object o: this.headers.keySet()) {
final String key = (String) o; //fucking non-generics MultiMap
if (!name.equalsIgnoreCase(key)) {
//copy all other headers to the result multimap
for(final String s: (Collection<String>)this.headers.get(o)) {
result.put(o, s);
}
}
}
this.headers.clear();
this.headers.putAll(result);
this.addHeader(name, value);
}
内容来源于网络,如有侵权,请联系作者删除!