/[classpath]/classpath/javax/security/auth/x500/X500Principal.java
ViewVC logotype

Diff of /classpath/javax/security/auth/x500/X500Principal.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4.2.4 by gnu_andrew, Tue Aug 16 16:22:38 2005 UTC revision 1.4.2.5 by gnu_andrew, Wed Nov 2 00:43:41 2005 UTC
# Line 140  public final class X500Principal impleme Line 140  public final class X500Principal impleme
140    // Instance methods.    // Instance methods.
141    // ------------------------------------------------------------------------    // ------------------------------------------------------------------------
142    
143      public int hashCode()
144      {
145        int result = size();
146        for (int i = 0; i < size(); ++i)
147          {
148            Map m = (Map) components.get(i);
149            for (Iterator it2 = m.entrySet().iterator(); it2.hasNext(); )
150              {
151                Map.Entry e = (Map.Entry) it2.next();
152                // We don't bother looking at the value of the entry.
153                result = result * 31 + ((OID) e.getKey()).hashCode();
154              }
155          }
156        return result;
157      }
158    
159    public boolean equals(Object o)    public boolean equals(Object o)
160    {    {
161      if (!(o instanceof X500Principal))      if (!(o instanceof X500Principal))

Legend:
Removed from v.1.4.2.4  
changed lines
  Added in v.1.4.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26