asIndex

fun asIndex(): Int

Casts this PathElement as a Index and retrieves its kotlin.Int value. Throws an exception if the PathElement is not a Index.