From 1472345da1162711b5b04e25c81fa189d368b7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Spasic=CC=81?= Date: Mon, 21 Feb 2022 23:44:36 +0100 Subject: [PATCH] Better javadoc --- src/main/java/jodd/http/HeadersMultiMap.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/jodd/http/HeadersMultiMap.java b/src/main/java/jodd/http/HeadersMultiMap.java index 6ae0b81..ef2a376 100644 --- a/src/main/java/jodd/http/HeadersMultiMap.java +++ b/src/main/java/jodd/http/HeadersMultiMap.java @@ -34,8 +34,7 @@ protected HeadersMultiMap() { } /** - * Adds new header value. If existing value exist, it will be removed - * so the store the new key value. + * Adds new header value. Allows multiple values for the same name. */ public void addHeader(final String name, final String value) { List valuesList = super.getAll(name); @@ -48,10 +47,16 @@ public void addHeader(final String name, final String value) { super.addAll(name, valuesList); } + /** + * Sets the header value. Existing value will bee replaces. + */ public void setHeader(final String name, final String value) { super.set(name, value); } + /** + * Returns header value. In case of multiple values, returns only the first value. + */ public String getHeader(final String name) { return super.get(name); }