core/play/src/main/java/play/core/cookie/encoding/ServerCookieEncoder.java
public List<String> encode(Collection<? extends Cookie> cookies) {
    if (cookies == null) {
      throw new NullPointerException("cookies");
    }
    if (cookies.isEmpty()) {
      return Collections.emptyList();
    }

    List<String> encoded = new ArrayList<String>(cookies.size());
    for (Cookie c : cookies) {
      if (c == null) {
        break;
      }
      encoded.add(encode(c));
    }
    return encoded;
  }
public List<String> encode(Collection<? extends Cookie> cookies) {
    if (cookies == null) {
      throw new NullPointerException("cookies");
    }
    if (cookies.isEmpty()) {
      return Collections.emptyList();
    }

    List<String> encoded = new ArrayList<String>(cookies.size());
    for (Cookie c : cookies) {
      if (c == null) {
        break;
      }
      encoded.add(encode(c));
    }
    return encoded;
  }
public List < String > encode ( Collection < ? extends Cookie > cookies ) { if ( cookies == null ) { throw new NullPointerException ( "cookies" ) ; } if ( cookies . isEmpty ( ) ) { return Collections . emptyList ( ) ; } List < String > encoded = new ArrayList < String > ( cookies . size ( ) ) ; for ( Cookie c : cookies ) { if ( c == null ) { break ; } encoded . add ( encode ( c ) ) ; } return encoded ; }
Batch encodes cookies into Set-Cookie header values.

@param cookies a bunch of cookies
@return the corresponding bunch of Set-Cookie headers
Batch encodes cookies into Set - Cookie header values .