public boolean endsWith(Name name) {
		DistinguishedName path = null;
		if (name instanceof DistinguishedName) {
			path = (DistinguishedName) name;
		}
		else {
			return false;
		}

		List shortlist = path.getNames();

		// this path must be at least as long
		if (getNames().size() < shortlist.size()) {
            return false;
        }

		// must have names
		if (shortlist.size() == 0) {
            return false;
        }

		ListIterator longiter = getNames().listIterator(getNames().size());
		ListIterator shortiter = shortlist.listIterator(shortlist.size());

		while (shortiter.hasPrevious()) {
			LdapRdn longname = (LdapRdn) longiter.previous();
			LdapRdn shortname = (LdapRdn) shortiter.previous();

			if (!longname.equals(shortname))
				return false;
		}

		// if short list ended, all were equal
		return true;

	}
public boolean endsWith ( Name name ) { DistinguishedName path = null ; if ( name instanceof DistinguishedName ) { path = ( DistinguishedName ) name ; } else { return false ; } List shortlist = path . getNames ( ) ; if ( getNames ( ) . size ( ) < shortlist . size ( ) ) { return false ; } if ( shortlist . size ( ) == 0 ) { return false ; } ListIterator longiter = getNames ( ) . listIterator ( getNames ( ) . size ( ) ) ; ListIterator shortiter = shortlist . listIterator ( shortlist . size ( ) ) ; while ( shortiter . hasPrevious ( ) ) { LdapRdn longname = ( LdapRdn ) longiter . previous ( ) ; LdapRdn shortname = ( LdapRdn ) shortiter . previous ( ) ; if ( ! longname . equals ( shortname ) ) return false ; } return true ; }
Determines if this <code>DistinguishedName</code> ends with a certian
path.

If the argument path is empty (no names in path) this method will return
<code>false</code>.

@param name The suffix to check for.