X
- Type of itempublic final class Synced<X> extends Object implements Iterable<X>
This class should be used very carefully. You must understand that
it will fetch the entire content of the encapsulated Iterable
on each
method call. It doesn't cache the data anyhow. If you don't
need this Iterable
to re-fresh
its content on every call, by doing round-trips to
the encapsulated iterable, use Sticky
.
Objects of this class are thread-safe.
Constructor and Description |
---|
Synced(Iterable<X> iterable)
Ctor.
|
Synced(Iterable<X> iterable,
Object lck)
Ctor.
|
Synced(X... src)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
Iterator<X> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
@SafeVarargs public Synced(X... src)
src
- The underlying iterablepublic Synced(Iterable<X> iterable)
iterable
- The iterable synchronize access to.Copyright © 2017–2019 Cactoos. All rights reserved.