Kactoos

kactoos-jvm / nnl.rocks.kactoos.collection / Reversed

Reversed

class Reversed<out X : Any> : CollectionEnvelope<X>

Reversed collection.

Pay attention that sorting will happen on each operation with the collection. Every time you touch it, it will fetch the entire collection from the encapsulated object and reverse it. If you want to avoid that behaviour, decorate it with Sticky.

There is no thread-safety guarantee.

Parameters

X - Type of source item

Since 0.4

Constructors

Name Summary
<init> Reversed(src: Collection<X>)
Reversed(src: Iterable<X>)
Reversed(vararg src: X)

Inherited Functions

Name Summary
iterator open fun iterator(): Iterator<X>