/** * Compares the RDN to the rdn passed. Note: If an there exist any * mulivalues in one RDN they must all be present in the other. * * @param rdn the RDN to compare to * * @throws IllegalArgumentException if the application compares a name * with an OID. */ public boolean equals(RDN rdn){ if (this.values.size() != rdn.values.size()){ return false; } int j,i; for (i=0; i<this.values.size(); i++){ //verify that the current value and type exists in the other list j=0; //May need a more intellegent compare while ( j<values.size() && ( !((String)this.values.get(i)).equalsIgnoreCase( (String) rdn.values.get(j)) || !equalAttrType((String)this.types.get(i), (String) rdn.types.get(j)))){ j++; } if (j >= rdn.values.size()) //couldn't find first value return false; } return true; }