static List<String> toSetCookieHeaders(boolean strict, Collection<? extends Cookie> cookies) {
        requireNonNull(cookies, "cookies");
        if (cookies.isEmpty()) {
            return ImmutableList.of();
        }

        return CookieUtil.toSetCookieHeaders(ImmutableList.builderWithExpectedSize(cookies.size()),
                                             strict, cookies.iterator());
    }
Encodes the specified {@link Cookie}s into {@code "Set-Cookie"} header values.

@param strict whether to validate that the cookie names and values are in the valid scope
              defined in RFC 6265.
@param cookies the {@link Cookie}s to encode.
@return the encoded {@code "Set-Cookie"} header values.
core/src/main/java/com/linecorp/armeria/common/Cookie.java