name: accommodate typed components in getSuccessor

refs #4570

Change-Id: I8dae1c983663f1d04fbb2e2b82d9fe1e9b4aabda
diff --git a/src/name-component.hpp b/src/name-component.hpp
index 1f5e16c..47b6b93 100644
--- a/src/name-component.hpp
+++ b/src/name-component.hpp
@@ -566,6 +566,26 @@
     return compare(other) > 0;
   }
 
+  /**
+   * @brief Get the successor of this name component.
+   *
+   * The successor of a name component is defined as follows:
+   *
+   *     C represents the set of name components, and X,Y ∈ C.
+   *     Operator < is defined by canonical order on C.
+   *     Y is the successor of X, if (a) X < Y, and (b) ∄ Z ∈ C s.t. X < Z < Y.
+   *
+   * In plain words, successor of a name component is the next possible name component.
+   *
+   * Examples:
+   *
+   * - successor of `sha256digest=0000000000000000000000000000000000000000000000000000000000000000`
+   *   is `sha256digest=0000000000000000000000000000000000000000000000000000000000000001`.
+   * - successor of `sha256digest=ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`
+   *   is `2=...`.
+   * - successor of `A` is `B`.
+   * - successor of `%FF` is `%00%00`.
+   */
   Component
   getSuccessor() const;