Sets the index to a specified
depth
. (The
index is the location within the backing byte array from which the next {@link #decode} operation will decode a segment value.) If
depth
is 0 then this method is equivalent to {@link #reset}. If
depth
is positive, then the index is set to point to the
depth
th key segment. If
depth
is negative, then the index is set to point to a key segment
-depth
segments from the end. For example,
key.clear().append("a").append("b").append("c"); return key.indexTo(-1).decode();
returns "c".
@param depth The depth, as defined above.
@return This
Key
, to permit method call chaining