getAsOrNull

inline fun <T> Product.getAsOrNull(n: Int): T?

The n'th element of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,), returns x,,(n+1),, where 0 <= n < k. The result is cast to the given type T.

Return

the element n elements after the first element, null if out of bounds or unable to be cast

Parameters

n

the index of the element to return


inline fun <T> Product.getAsOrNull(indexRange: IntRange): List<T?>

The range of n'th elements of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,), returns x,,(n+1),, where 0 <= n < k. The results are cast to the given type T.

Return

the elements in indexRange, null is out of bounds or unable to be cast

Parameters

indexRange

the indices of the elements to return