Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.asn1.x500.style;
 
Variation of BCStyle that insists on strict ordering for equality and hashCode comparisons
public class BCStrictStyle
    extends BCStyle
    public static final X500NameStyle INSTANCE = new BCStrictStyle();
    public boolean areEqual(X500Name name1X500Name name2)
    {
        RDN[] rdns1 = name1.getRDNs();
        RDN[] rdns2 = name2.getRDNs();
        if (rdns1.length != rdns2.length)
        {
            return false;
        }
        for (int i = 0; i != rdns1.lengthi++)
        {
            if (!rdnAreEqual(rdns1[i], rdns2[i]))
            {
                return false;
            }
        }
        return true;
    }
New to GrepCode? Check out our FAQ X