org.apache.http.cookie

## Class CookiePathComparator

- java.lang.Object
- - org.apache.http.cookie.CookiePathComparator

- All Implemented Interfaces:
    Serializable ， Comparator < Cookie >

      @Contract(threading=IMMUTABLE)
      public class CookiePathComparator
      extends Object
      implements Serializable, Comparator<Cookie>

  该cookie比较器确保满足一般标准的多个Cookie在`Cookie`头中排序，以便具有更特定Path Path属性的那些具有先于较不具体的特性。

  此比较器假定两个Cookie路径的Path属性匹配一个commmon request-URI。 否则，比较的结果是未定义的。

  从以下版本开始：
    4
  另请参见：
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static CookiePathComparator` | `INSTANCE`

  - ### 构造方法摘要

    构造方法
    Constructor and Description
    `CookiePathComparator()`

  - ### 方法摘要

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Cookie c1, Cookie c2)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `equals`

- - ### 字段详细信息

    - #### INSTANCE

          public static final CookiePathComparator INSTANCE

  - ### 构造方法详细信息

    - #### CookiePathComparator

          public CookiePathComparator()

  - ### 方法详细信息

    - #### compare

          public int compare(Cookie c1,
                    Cookie c2)

      Specified by:
        `compare`在界面 `Comparator<Cookie>`

Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.

本帮助文档是使用 《谷歌翻译》翻译，请与英文版配合使用 by--QQ:654638585