jdk/src/share/classes/sun/security/ssl/CipherSuite.java
changeset 10336 0bb1999251f8
parent 9035 1255eb81cc2f
child 10917 becbe249e46b
equal deleted inserted replaced
10335:3c7eda3ab2f5 10336:0bb1999251f8
    63  *
    63  *
    64  *  . if the member variable allowed is false, the given algorithm is either
    64  *  . if the member variable allowed is false, the given algorithm is either
    65  *    unavailable or disabled at compile time
    65  *    unavailable or disabled at compile time
    66  *
    66  *
    67  */
    67  */
    68 final class CipherSuite implements Comparable {
    68 final class CipherSuite implements Comparable<CipherSuite> {
    69 
    69 
    70     // minimum priority for supported CipherSuites
    70     // minimum priority for supported CipherSuites
    71     final static int SUPPORTED_SUITES_PRIORITY = 1;
    71     final static int SUPPORTED_SUITES_PRIORITY = 1;
    72 
    72 
    73     // minimum priority for default enabled CipherSuites
    73     // minimum priority for default enabled CipherSuites
   200      * used by CipherSuiteList. Follows standard Comparable contract.
   200      * used by CipherSuiteList. Follows standard Comparable contract.
   201      *
   201      *
   202      * Note that for unsupported CipherSuites parsed from a handshake
   202      * Note that for unsupported CipherSuites parsed from a handshake
   203      * message we violate the equals() contract.
   203      * message we violate the equals() contract.
   204      */
   204      */
   205     public int compareTo(Object o) {
   205     public int compareTo(CipherSuite o) {
   206         return ((CipherSuite)o).priority - priority;
   206         return o.priority - priority;
   207     }
   207     }
   208 
   208 
   209     /**
   209     /**
   210      * Returns this.name.
   210      * Returns this.name.
   211      */
   211      */