@Test public void testRDNCompareToNullRdn() throws LdapException { Rdn rdn1 = new Rdn( " a = b " ); assertFalse( rdn1.equals( null ) ); }
@Override public boolean equals( Object that ) { if ( this == that ) { return true; } Rdn rdn; if ( that instanceof String ) { try { rdn = new Rdn( schemaManager, ( String ) that ); } catch ( LdapInvalidDnException e ) { return false; } } else if ( !( that instanceof Rdn ) ) { return false; } else { rdn = ( Rdn ) that; } if ( rdn.nbAvas != nbAvas ) { return false; } switch ( nbAvas ) { case 0: return true; case 1: return ava.equals( rdn.ava ); default: for ( Ava paramAva : rdn.avas ) { List<Ava> avaList = avaTypes.get( paramAva.getNormType() ); if ( ( avaList == null ) || !avaList.contains( paramAva ) ) { return false; } } return true; } }
Rdn implements Cloneable, Externalizable, Iterable<Ava>, Comparable<Rdn> { @Override public boolean equals( Object that ) { if ( this == that ) { return true; } Rdn rdn; if ( that instanceof String ) { try { rdn = new Rdn( schemaManager, ( String ) that ); } catch ( LdapInvalidDnException e ) { return false; } } else if ( !( that instanceof Rdn ) ) { return false; } else { rdn = ( Rdn ) that; } if ( rdn.nbAvas != nbAvas ) { return false; } switch ( nbAvas ) { case 0: return true; case 1: return ava.equals( rdn.ava ); default: for ( Ava paramAva : rdn.avas ) { List<Ava> avaList = avaTypes.get( paramAva.getNormType() ); if ( ( avaList == null ) || !avaList.contains( paramAva ) ) { return false; } } return true; } } }
Rdn implements Cloneable, Externalizable, Iterable<Ava>, Comparable<Rdn> { @Override public boolean equals( Object that ) { if ( this == that ) { return true; } Rdn rdn; if ( that instanceof String ) { try { rdn = new Rdn( schemaManager, ( String ) that ); } catch ( LdapInvalidDnException e ) { return false; } } else if ( !( that instanceof Rdn ) ) { return false; } else { rdn = ( Rdn ) that; } if ( rdn.nbAvas != nbAvas ) { return false; } switch ( nbAvas ) { case 0: return true; case 1: return ava.equals( rdn.ava ); default: for ( Ava paramAva : rdn.avas ) { List<Ava> avaList = avaTypes.get( paramAva.getNormType() ); if ( ( avaList == null ) || !avaList.contains( paramAva ) ) { return false; } } return true; } } Rdn();  Rdn( SchemaManager schemaManager );  Rdn( SchemaManager schemaManager, String rdn );  Rdn( String rdn );  Rdn( SchemaManager schemaManager, String upType, String upValue );  Rdn( String upType, String upValue );  Rdn( SchemaManager schemaManager, Ava... avas );  Rdn( Ava... avas );  Rdn( Rdn rdn );  Rdn( SchemaManager schemaManager, Rdn rdn ); }
Rdn implements Cloneable, Externalizable, Iterable<Ava>, Comparable<Rdn> { @Override public boolean equals( Object that ) { if ( this == that ) { return true; } Rdn rdn; if ( that instanceof String ) { try { rdn = new Rdn( schemaManager, ( String ) that ); } catch ( LdapInvalidDnException e ) { return false; } } else if ( !( that instanceof Rdn ) ) { return false; } else { rdn = ( Rdn ) that; } if ( rdn.nbAvas != nbAvas ) { return false; } switch ( nbAvas ) { case 0: return true; case 1: return ava.equals( rdn.ava ); default: for ( Ava paramAva : rdn.avas ) { List<Ava> avaList = avaTypes.get( paramAva.getNormType() ); if ( ( avaList == null ) || !avaList.contains( paramAva ) ) { return false; } } return true; } } Rdn();  Rdn( SchemaManager schemaManager );  Rdn( SchemaManager schemaManager, String rdn );  Rdn( String rdn );  Rdn( SchemaManager schemaManager, String upType, String upValue );  Rdn( String upType, String upValue );  Rdn( SchemaManager schemaManager, Ava... avas );  Rdn( Ava... avas );  Rdn( Rdn rdn );  Rdn( SchemaManager schemaManager, Rdn rdn ); Object getValue( String type ); Ava getAva( String type ); @Override Iterator<Ava> iterator(); @Override Rdn clone(); String getName(); String getNormName(); Ava getAva(); Ava getAva( int pos ); String getType(); String getNormType(); String getValue(); @Override boolean equals( Object that ); int size(); static Object unescapeValue( String value ); static String escapeValue( String value ); String getEscaped(); static String escapeValue( byte[] attrValue ); boolean isSchemaAware(); static boolean isValid( String dn ); static boolean isValid( SchemaManager schemaManager, String dn ); @Override int hashCode(); int serialize( byte[] buffer, int pos ); int deserialize( byte[] buffer, int pos ); @Override void writeExternal( ObjectOutput out ); @Override void readExternal( ObjectInput in ); @Override int compareTo( Rdn otherRdn ); @Override String toString(); }
Rdn implements Cloneable, Externalizable, Iterable<Ava>, Comparable<Rdn> { @Override public boolean equals( Object that ) { if ( this == that ) { return true; } Rdn rdn; if ( that instanceof String ) { try { rdn = new Rdn( schemaManager, ( String ) that ); } catch ( LdapInvalidDnException e ) { return false; } } else if ( !( that instanceof Rdn ) ) { return false; } else { rdn = ( Rdn ) that; } if ( rdn.nbAvas != nbAvas ) { return false; } switch ( nbAvas ) { case 0: return true; case 1: return ava.equals( rdn.ava ); default: for ( Ava paramAva : rdn.avas ) { List<Ava> avaList = avaTypes.get( paramAva.getNormType() ); if ( ( avaList == null ) || !avaList.contains( paramAva ) ) { return false; } } return true; } } Rdn();  Rdn( SchemaManager schemaManager );  Rdn( SchemaManager schemaManager, String rdn );  Rdn( String rdn );  Rdn( SchemaManager schemaManager, String upType, String upValue );  Rdn( String upType, String upValue );  Rdn( SchemaManager schemaManager, Ava... avas );  Rdn( Ava... avas );  Rdn( Rdn rdn );  Rdn( SchemaManager schemaManager, Rdn rdn ); Object getValue( String type ); Ava getAva( String type ); @Override Iterator<Ava> iterator(); @Override Rdn clone(); String getName(); String getNormName(); Ava getAva(); Ava getAva( int pos ); String getType(); String getNormType(); String getValue(); @Override boolean equals( Object that ); int size(); static Object unescapeValue( String value ); static String escapeValue( String value ); String getEscaped(); static String escapeValue( byte[] attrValue ); boolean isSchemaAware(); static boolean isValid( String dn ); static boolean isValid( SchemaManager schemaManager, String dn ); @Override int hashCode(); int serialize( byte[] buffer, int pos ); int deserialize( byte[] buffer, int pos ); @Override void writeExternal( ObjectOutput out ); @Override void readExternal( ObjectInput in ); @Override int compareTo( Rdn otherRdn ); @Override String toString(); static final Rdn EMPTY_RDN; static final int UNDEFINED; static final int SUPERIOR; static final int INFERIOR; static final int EQUAL; }