本文整理了Java中org.eclipse.jetty.util.MultiMap.get()
方法的一些代码示例,展示了MultiMap.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.get()
方法的具体详情如下:
包路径:org.eclipse.jetty.util.MultiMap
类名称:MultiMap
方法名:get
[英]Get value as String. Single valued items are converted to a String with the toString() Object method. Multi valued entries are converted to a comma separated List. No quoting of commas within values is performed.
[中]获取字符串形式的值。使用toString()对象方法将单值项转换为字符串。多值条目将转换为逗号分隔的列表。不在值中引用逗号。
代码示例来源:origin: org.eclipse.jetty/jetty-util
/** Add value to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param value The entry value.
*/
public void add(String name, V value)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.add(value);
super.put(name,lo);
}
代码示例来源:origin: org.eclipse.jetty/jetty-util
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The String array of multiple values.
*/
public void addValues(String name, V[] values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(Arrays.asList(values));
put(name,lo);
}
代码示例来源:origin: org.eclipse.jetty/jetty-util
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The List of multiple values.
*/
public void addValues(String name, List<V> values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(values);
put(name,lo);
}
代码示例来源:origin: org.eclipse.jetty/jetty-util
List<V> vals =get(name);
if ((vals == null) || (vals.isEmpty()))
代码示例来源:origin: org.eclipse.jetty/jetty-util
/** Remove value.
* @param name The entry key.
* @param value The entry value.
* @return true if it was removed.
*/
public boolean removeValue(String name,V value)
{
List<V> lo = get(name);
if((lo == null)||(lo.isEmpty())) {
return false;
}
boolean ret = lo.remove(value);
if(lo.isEmpty()) {
remove(name);
} else {
put(name,lo);
}
return ret;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/** Add value to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param value The entry value.
*/
public void add(String name, V value)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.add(value);
super.put(name,lo);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/** Add value to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param value The entry value.
*/
public void add(String name, V value)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.add(value);
super.put(name,lo);
}
代码示例来源:origin: jenkinsci/winstone
/** Add value to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param value The entry value.
*/
public void add(String name, V value)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.add(value);
super.put(name,lo);
}
代码示例来源:origin: Nextdoor/bender
/** Add value to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param value The entry value.
*/
public void add(String name, V value)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.add(value);
super.put(name,lo);
}
代码示例来源:origin: Nextdoor/bender
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The String array of multiple values.
*/
public void addValues(String name, V[] values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(Arrays.asList(values));
put(name,lo);
}
代码示例来源:origin: Nextdoor/bender
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The List of multiple values.
*/
public void addValues(String name, List<V> values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(values);
put(name,lo);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The String array of multiple values.
*/
public void addValues(String name, V[] values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(Arrays.asList(values));
put(name,lo);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The List of multiple values.
*/
public void addValues(String name, List<V> values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(values);
put(name,lo);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The String array of multiple values.
*/
public void addValues(String name, V[] values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(Arrays.asList(values));
put(name,lo);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The List of multiple values.
*/
public void addValues(String name, List<V> values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(values);
put(name,lo);
}
代码示例来源:origin: jenkinsci/winstone
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The List of multiple values.
*/
public void addValues(String name, List<V> values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(values);
put(name,lo);
}
代码示例来源:origin: jenkinsci/winstone
/** Add values to multi valued entry.
* If the entry is single valued, it is converted to the first
* value of a multi valued entry.
* @param name The entry key.
* @param values The String array of multiple values.
*/
public void addValues(String name, V[] values)
{
List<V> lo = get(name);
if(lo == null) {
lo = new ArrayList<>();
}
lo.addAll(Arrays.asList(values));
put(name,lo);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
private String getParameterBytesAsString (String name, byte[] bytes)
throws UnsupportedEncodingException
{
//check if there is a specific encoding for the parameter
Object ct = _params.get(name+CONTENT_TYPE_SUFFIX);
//use default if not
String contentType = _encoding;
if (ct != null)
{
String tmp = MimeTypes.getCharsetFromContentType(new ByteArrayBuffer((String)ct));
contentType = (tmp == null?_encoding:tmp);
}
return new String(bytes,contentType);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/** Remove value.
* @param name The entry key.
* @param value The entry value.
* @return true if it was removed.
*/
public boolean removeValue(String name,V value)
{
List<V> lo = get(name);
if((lo == null)||(lo.isEmpty())) {
return false;
}
boolean ret = lo.remove(value);
if(lo.isEmpty()) {
remove(name);
} else {
put(name,lo);
}
return ret;
}
代码示例来源:origin: Nextdoor/bender
/** Remove value.
* @param name The entry key.
* @param value The entry value.
* @return true if it was removed.
*/
public boolean removeValue(String name,V value)
{
List<V> lo = get(name);
if((lo == null)||(lo.isEmpty())) {
return false;
}
boolean ret = lo.remove(value);
if(lo.isEmpty()) {
remove(name);
} else {
put(name,lo);
}
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!