org.apache.http.cookie

## Class CookiePriorityComparator

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

- All Implemented Interfaces:
    Comparator < Cookie >

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

  该cookie比较器确保具有较长路径的Cookie优先于具有较短路径的Cookie。 具有等效创建时间的路径长度相同的Cookie的Cookie优先于稍后创建时间的Cookie
  从以下版本开始：
    4.4

- - ### Field Summary

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

  - ### 构造方法摘要

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

  - ### 方法摘要

    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 CookiePriorityComparator INSTANCE

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

    - #### CookiePriorityComparator

          public CookiePriorityComparator()

  - ### 方法详细信息

    - #### 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