本文整理了Java中com.unboundid.ldap.sdk.DN.equals()
方法的一些代码示例,展示了DN.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DN.equals()
方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.DN
类名称:DN
方法名:equals
[英]Indicates whether the provided object is equal to this DN. In order for the provided object to be considered equal, it must be a non-null DN with the same set of RDN components.
[中]指示提供的对象是否等于此DN。为了使提供的对象被视为相等,它必须是具有相同RDN组件集的非空DN。
代码示例来源:origin: com.nimbusds/common
/**
* Logs the configuration details at INFO level.
*/
@Override
public void log() {
Logger log = LogManager.getLogger(LOG_CATEGORY);
if (dn.equals(DN.NULL_DN))
log.info("[CM1050] Directory user DN: [anonymous]");
else
log.info("[CM1050] Directory user DN: {}", dn);
}
}
代码示例来源:origin: com.nimbusds/common
/**
* Returns the authzId string representation of the specified
* distinguished name (DN).
*
* @param dn The distinguished name (DN). Must not be {@code null}.
*
* @return The authzId string.
*/
private static String toAuthzIdString(final DN dn) {
if (dn == null)
throw new IllegalArgumentException("The authzId DN must not be null");
if (dn.equals(DN.NULL_DN))
return "dn:";
else
return "dn:" + dn.toNormalizedString();
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Indicates whether the DN with the provided string representation is equal
* to this DN.
*
* @param s The string representation of the DN to compare with this DN.
*
* @return {@code true} if the DN with the provided string representation is
* equal to this DN, or {@code false} if not.
*
* @throws LDAPException If the provided string cannot be parsed as a DN.
*/
public boolean equals(final String s)
throws LDAPException
{
if (s == null)
{
return false;
}
return equals(new DN(s));
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Indicates whether the DN with the provided string representation is equal
* to this DN.
*
* @param s The string representation of the DN to compare with this DN.
*
* @return {@code true} if the DN with the provided string representation is
* equal to this DN, or {@code false} if not.
*
* @throws LDAPException If the provided string cannot be parsed as a DN.
*/
public boolean equals(final String s)
throws LDAPException
{
if (s == null)
{
return false;
}
return equals(new DN(s));
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Indicates whether the provided strings represent the same distinguished
* name.
*
* @param dn1 The first DN to be compared.
* @param dn2 The second DN to be compared.
*
* @return {@code true} if the provided strings represent the same
* distinguished name, or {@code false} if not or if either of the
* values cannot be parsed as a valid DN.
*/
public static boolean equals(final String dn1, final String dn2)
{
try
{
return DN.equals(dn1, dn2);
}
catch (Exception e)
{
debugException(e);
return false;
}
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Indicates whether the two provided strings represent the same DN.
*
* @param s1 The string representation of the first DN for which to make the
* determination. It must not be {@code null}.
* @param s2 The string representation of the second DN for which to make
* the determination. It must not be {@code null}.
*
* @return {@code true} if the provided strings represent the same DN, or
* {@code false} if not.
*
* @throws LDAPException If either of the provided strings cannot be parsed
* as a DN.
*/
public static boolean equals(final String s1, final String s2)
throws LDAPException
{
return new DN(s1).equals(new DN(s2));
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Indicates whether the two provided strings represent the same DN.
*
* @param s1 The string representation of the first DN for which to make the
* determination. It must not be {@code null}.
* @param s2 The string representation of the second DN for which to make
* the determination. It must not be {@code null}.
*
* @return {@code true} if the provided strings represent the same DN, or
* {@code false} if not.
*
* @throws LDAPException If either of the provided strings cannot be parsed
* as a DN.
*/
public static boolean equals(final String s1, final String s2)
throws LDAPException
{
return new DN(s1).equals(new DN(s2));
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
for (final SearchResultEntry e : searchEntries)
if (parsedDN.equals(e.getParsedDN()))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
else if (dn.equals(subschemaSubentryDN))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
for (final SearchResultEntry e : searchEntries)
if (parsedDN.equals(e.getParsedDN()))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
if (! foundDN.equals(expectedDN))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
return equals(baseDN);
return baseDN.equals(getParent());
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
return equals(baseDN);
return baseDN.equals(getParent());
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
if (! dn1.equals(dn2))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
return getParsedDN().equals(r.getParsedDN());
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
if (e.getParsedDN().equals(parsedDN))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
return getParsedDN().equals(r.getParsedDN());
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
if (! foundDN.equals(expectedDN))
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
return dn1.equals(dn2);
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
return dn1.equals(dn2);
内容来源于网络,如有侵权,请联系作者删除!