public DistinguishedName immutableDistinguishedName ( ) { List listWithImmutableRdns = new ArrayList ( names . size ( ) ) ; for ( Iterator iterator = names . iterator ( ) ; iterator . hasNext ( ) ; ) { LdapRdn rdn = ( LdapRdn ) iterator . next ( ) ; listWithImmutableRdns . add ( rdn . immutableLdapRdn ( ) ) ; } return new DistinguishedName ( Collections . unmodifiableList ( listWithImmutableRdns ) ) ; }
Return an immutable copy of this instance . It will not be possible to add or remove any Rdns to or from the returned instance and the respective Rdns will also be immutable in turn .