Code example for TreeSet

Methods: addremove

	public synchronized void addCookie(Cookie cookie)
		if (cookie != null)
			// first remove any old cookie that is equivalent 
			if (!cookie.isExpired(new Date()))
	 * Adds an array of {@link Cookie HTTP cookies}. Cookies are added 
	 * individually and 
	 * in the given array order. If any of the given cookies has already 
	 * expired it will 
	 * not be added, but existing values will still be removed.