本文整理了Java中com.unboundid.ldap.sdk.DN.compare()
方法的一些代码示例,展示了DN.compare()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DN.compare()
方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.DN
类名称:DN
方法名:compare
[英]Compares the provided DN values to determine their relative order in a sorted list.
[中]比较提供的DN值以确定它们在排序列表中的相对顺序。
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Compares the provided DN to this DN to determine their relative order in
* a sorted list.
*
* @param dn The DN to compare against this DN. It must not be
* {@code null}.
*
* @return A negative integer if this DN should come before the provided DN
* in a sorted list, a positive integer if this DN should come after
* the provided DN in a sorted list, or zero if the provided DN can
* be considered equal to this DN.
*/
public int compareTo(final DN dn)
{
return compare(this, dn);
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Compares the provided DN to this DN to determine their relative order in
* a sorted list.
*
* @param dn The DN to compare against this DN. It must not be
* {@code null}.
*
* @return A negative integer if this DN should come before the provided DN
* in a sorted list, a positive integer if this DN should come after
* the provided DN in a sorted list, or zero if the provided DN can
* be considered equal to this DN.
*/
public int compareTo(final DN dn)
{
return compare(this, dn);
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Compares the DNs with the provided string representations to determine
* their relative order in a sorted list.
*
* @param s1 The string representation for the first DN to be compared. It
* must not be {@code null}.
* @param s2 The string representation for the second DN to be compared. It
* must not be {@code null}.
*
* @return A negative integer if the first DN should come before the second
* DN in a sorted list, a positive integer if the first DN should
* come after the second DN in a sorted list, or zero if the two DN
* values can be considered equal.
*
* @throws LDAPException If either of the provided strings cannot be parsed
* as a DN.
*/
public static int compare(final String s1, final String s2)
throws LDAPException
{
return compare(s1, s2, null);
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Compares the DNs with the provided string representations to determine
* their relative order in a sorted list.
*
* @param s1 The string representation for the first DN to be compared. It
* must not be {@code null}.
* @param s2 The string representation for the second DN to be compared. It
* must not be {@code null}.
*
* @return A negative integer if the first DN should come before the second
* DN in a sorted list, a positive integer if the first DN should
* come after the second DN in a sorted list, or zero if the two DN
* values can be considered equal.
*
* @throws LDAPException If either of the provided strings cannot be parsed
* as a DN.
*/
public static int compare(final String s1, final String s2)
throws LDAPException
{
return compare(s1, s2, null);
}
内容来源于网络,如有侵权,请联系作者删除!