From 8de5b2eff206a39d408f149cecc29607ffa62846 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 09 Feb 2016 14:00:40 +0000
Subject: [PATCH] DN.java: Added precisions about localName(int) vs. parent(int)

---
 opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java
index dd9f7ea..e2deffc 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java
@@ -736,12 +736,16 @@
      * dn.localName(dn.size()).equals(dn);
      * </pre>
      *
+     * Said otherwise, a new DN is built using {@code index} RDNs,
+     * retained in the same order, starting from the left.
+     *
      * @param index
      *            The number of RDNs to be included in the local name.
      * @return The DN whose content is the specified number of RDNs from this
      *         DN.
      * @throws IllegalArgumentException
      *             If {@code index} is less than zero.
+     * @see #parent(int) for the reverse operation (starting from the right)
      */
     public DN localName(final int index) {
         Reject.ifFalse(index >= 0, "index less than zero");
@@ -786,6 +790,9 @@
      * RDNs removed. Note that if {@code index} is zero then this DN will be
      * returned (identity).
      *
+     * Said otherwise, a new DN is built using {@code index} RDNs,
+     * retained in the same order, starting from the right.
+     *
      * @param index
      *            The number of RDNs to be removed.
      * @return The DN which is equal to this DN with the specified number of
@@ -793,6 +800,7 @@
      *         reached.
      * @throws IllegalArgumentException
      *             If {@code index} is less than zero.
+     * @see #localName(int) for the reverse operation (starting from the left)
      */
     public DN parent(final int index) {
         // We allow size + 1 so that we can return null as the parent of the

--
Gitblit v1.10.0