com.unboundid.ldap.sdk.DN.equals()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中com.unboundid.ldap.sdk.DN.equals()方法的一些代码示例,展示了DN.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DN.equals()方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.DN
类名称:DN
方法名:equals

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

  1. /**
  2. * Logs the configuration details at INFO level.
  3. */
  4. @Override
  5. public void log() {
  6. Logger log = LogManager.getLogger(LOG_CATEGORY);
  7. if (dn.equals(DN.NULL_DN))
  8. log.info("[CM1050] Directory user DN: [anonymous]");
  9. else
  10. log.info("[CM1050] Directory user DN: {}", dn);
  11. }
  12. }

代码示例来源:origin: com.nimbusds/common

  1. /**
  2. * Returns the authzId string representation of the specified
  3. * distinguished name (DN).
  4. *
  5. * @param dn The distinguished name (DN). Must not be {@code null}.
  6. *
  7. * @return The authzId string.
  8. */
  9. private static String toAuthzIdString(final DN dn) {
  10. if (dn == null)
  11. throw new IllegalArgumentException("The authzId DN must not be null");
  12. if (dn.equals(DN.NULL_DN))
  13. return "dn:";
  14. else
  15. return "dn:" + dn.toNormalizedString();
  16. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Indicates whether the DN with the provided string representation is equal
  3. * to this DN.
  4. *
  5. * @param s The string representation of the DN to compare with this DN.
  6. *
  7. * @return {@code true} if the DN with the provided string representation is
  8. * equal to this DN, or {@code false} if not.
  9. *
  10. * @throws LDAPException If the provided string cannot be parsed as a DN.
  11. */
  12. public boolean equals(final String s)
  13. throws LDAPException
  14. {
  15. if (s == null)
  16. {
  17. return false;
  18. }
  19. return equals(new DN(s));
  20. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Indicates whether the DN with the provided string representation is equal
  3. * to this DN.
  4. *
  5. * @param s The string representation of the DN to compare with this DN.
  6. *
  7. * @return {@code true} if the DN with the provided string representation is
  8. * equal to this DN, or {@code false} if not.
  9. *
  10. * @throws LDAPException If the provided string cannot be parsed as a DN.
  11. */
  12. public boolean equals(final String s)
  13. throws LDAPException
  14. {
  15. if (s == null)
  16. {
  17. return false;
  18. }
  19. return equals(new DN(s));
  20. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Indicates whether the provided strings represent the same distinguished
  3. * name.
  4. *
  5. * @param dn1 The first DN to be compared.
  6. * @param dn2 The second DN to be compared.
  7. *
  8. * @return {@code true} if the provided strings represent the same
  9. * distinguished name, or {@code false} if not or if either of the
  10. * values cannot be parsed as a valid DN.
  11. */
  12. public static boolean equals(final String dn1, final String dn2)
  13. {
  14. try
  15. {
  16. return DN.equals(dn1, dn2);
  17. }
  18. catch (Exception e)
  19. {
  20. debugException(e);
  21. return false;
  22. }
  23. }
  24. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Indicates whether the two provided strings represent the same DN.
  3. *
  4. * @param s1 The string representation of the first DN for which to make the
  5. * determination. It must not be {@code null}.
  6. * @param s2 The string representation of the second DN for which to make
  7. * the determination. It must not be {@code null}.
  8. *
  9. * @return {@code true} if the provided strings represent the same DN, or
  10. * {@code false} if not.
  11. *
  12. * @throws LDAPException If either of the provided strings cannot be parsed
  13. * as a DN.
  14. */
  15. public static boolean equals(final String s1, final String s2)
  16. throws LDAPException
  17. {
  18. return new DN(s1).equals(new DN(s2));
  19. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Indicates whether the two provided strings represent the same DN.
  3. *
  4. * @param s1 The string representation of the first DN for which to make the
  5. * determination. It must not be {@code null}.
  6. * @param s2 The string representation of the second DN for which to make
  7. * the determination. It must not be {@code null}.
  8. *
  9. * @return {@code true} if the provided strings represent the same DN, or
  10. * {@code false} if not.
  11. *
  12. * @throws LDAPException If either of the provided strings cannot be parsed
  13. * as a DN.
  14. */
  15. public static boolean equals(final String s1, final String s2)
  16. throws LDAPException
  17. {
  18. return new DN(s1).equals(new DN(s2));
  19. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. for (final SearchResultEntry e : searchEntries)
  2. if (parsedDN.equals(e.getParsedDN()))

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. else if (dn.equals(subschemaSubentryDN))

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. for (final SearchResultEntry e : searchEntries)
  2. if (parsedDN.equals(e.getParsedDN()))

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. if (! foundDN.equals(expectedDN))

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. return equals(baseDN);
  2. return baseDN.equals(getParent());

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. return equals(baseDN);
  2. return baseDN.equals(getParent());

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. if (! dn1.equals(dn2))

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. return getParsedDN().equals(r.getParsedDN());

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. if (e.getParsedDN().equals(parsedDN))

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. return getParsedDN().equals(r.getParsedDN());

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. if (! foundDN.equals(expectedDN))

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. return dn1.equals(dn2);

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. return dn1.equals(dn2);

相关文章