@Contract(threading=IMMUTABLE) public class CookiePathComparator extends Object implements Serializable, Comparator<Cookie>
Cookie头中排序,以便具有更特定Path Path属性的那些具有先于较不具体的特性。
此比较器假定两个Cookie路径的Path属性匹配一个commmon request-URI。 否则,比较的结果是未定义的。
| Modifier and Type | Field and Description |
|---|---|
static CookiePathComparator |
INSTANCE |
| Constructor and Description |
|---|
CookiePathComparator() |
public static final CookiePathComparator INSTANCE
public int compare(Cookie c1, Cookie c2)
compare在界面
Comparator<Cookie>
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.