kactoos-jvm / nnl.rocks.kactoos.scalar / ItemAt
class ItemAt<T :
Any
> :
Scalar
<
T
>
Element from position in Iterator or fallback value if iterator hasn’t this position.
There is no thread-safety guarantee.
T
- KScalar type
Since 0.3
| Name | Summary |
|—|—|
| <init> | ItemAt(src:
Scalar
<
Iterator
<
T
>>, pos:
Int
, fbk:
Func
<
Iterable
<
T
>,
T
>)
ItemAt(fallback:
T
, source:
Iterable
<
T
>)
ItemAt(source:
Iterable
<
T
>, fallback:
Func
<
Iterable
<
T
>,
T
> = FuncOf { throw IOException("The iterable is empty") })
ItemAt(position:
Int
, source:
Iterable
<
T
>)
ItemAt(position:
Int
, source:
Iterator
<
T
>)
ItemAt(source:
Iterable
<
T
>, position:
Int
, fallback:
Func
<
Iterable
<
T
>,
T
>)
ItemAt(iterator:
Iterator
<
T
>, fallback:
T
)
ItemAt(iterator:
Iterator
<
T
>, fallback:
Func
<
Iterable
<
T
>,
T
> = FuncOf { throw IOException("Iterator is empty") })
ItemAt(iterator:
Iterator
<
T
>, position:
Int
, fallback:
Func
<
Iterable
<
T
>,
T
> = FuncOf {
throw IOException(
FormattedText(
"Iterator doesn't have an element at #%d position",
position
).asString()
)
})
Ctor.ItemAt(src:
KScalar
<
Iterator
<
T
>>, pos:
Int
, fbk:
Func
<
Iterable
<
T
>,
T
>)
Element from position in Iterator or fallback value if iterator hasn’t this position. |
Name | Summary |
---|---|
invoke | fun invoke(): T Get value of this Scalar |