public abstract Path getName (int index)

Returns a name element of this path as a Path object.

The index parameter is the index of the name element to return. The element that is closest to the root in the directory hierarchy has index 0. The element that is farthest from the root has index count -1.

Parameters:
index     the index of the element

Returns:  the name element

Exceptions:
IllegalArgumentException     if index is negative, index is greater than or equal to the number of elements, or this path has zero name elements