T
- Element typepublic final class Shuffled<T> extends CollectionEnvelope<T>
Pay attention that shuffling will happen every time you touch
it: it will fetch all elements from the encapsulated collection and
shuffle them again on each call to any of its methods. If you want to
avoid that "side-effect", decorate it with Sticky
.
There is no thread-safety guarantee.
Constructor and Description |
---|
Shuffled(Collection<T> src)
Ctor.
|
Shuffled(Iterable<T> src)
Ctor.
|
Shuffled(T... src)
Ctor.
|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, removeIf, spliterator, stream
@SafeVarargs public Shuffled(T... src)
src
- The underlying collectionpublic Shuffled(Collection<T> src)
src
- The underlying collectionCopyright © 2017–2019 Cactoos. All rights reserved.