Skip to content
johnmcclean-aol edited this page Nov 23, 2016 · 4 revisions

ListX

ListX is an extended JDK List.

It implements List, ConvertableSequence, CyclopsCollectable, ExtendedTraversable, Filterable, Foldable, Functor, java.lang.Iterable, IterableFilterable, IterableFoldable, [IterableFunctor] ( ), OnEmpty, OnEmptySwitch<T,java.util.List>, org.reactivestreams.Publisher, Sequential, To, TransformerTraversable, Traversable, Unit, Zippable, ZippingApplicativable

Extensions methods

Eager v Lazy exeuction

LazyListX in cyclops-reactor offers lazy execution of extension operators.

Mutability

By default ListX instances are backed by a mutable ArrayList. This is configurable via the fromIterable method e.g.

ListX.fromIterable(ListX.immutableCollector(), Arrays.asList(1,2,3,4)) .plus(5);

For a persistent alternative see PVectorX or PStackX.

Clone this wiki locally