This method will take a RichIterable and wrap it directly in a SynchronizedRichIterable.
544589
public static <E> SynchronizedRichIterable<E> of(RichIterable<E> iterable)
    {
        return new SynchronizedRichIterable<E>(iterable);
    }
1209236
@SafeVarargs
    public static <T> CloseableIterable<T> chain(CloseableIterable<? extends T>... iterables) {
        return chain(asList(iterables));
    }
1140945
private static <T> UnmodifiableIterator<Iterator<? extends T>> iterators(Iterable<? extends CloseableIterable<? extends T>> iterables) {
        final Iterator<? extends Iterable<? extends T>> iterableIterator = iterables.iterator();
        return new UnmodifiableIterator<Iterator<? extends T>>() {
            @Override
            public boolean hasNext() {
                return iterableIterator.hasNext();
            }

            @Override
            public Iterator<? extends T> next() {
                return iterableIterator.next().iterator();
            }
        };
    }
549246
def fromiterable(cls, itr):
        """"""
        x, y, z = itr
        return cls(x, y, z)
1107827
def _synchronized(meth):
    """"""

    @functools.wraps(meth)
    def wrapper(self, *args, **kwargs):
        with self._lock:
            return meth(self, *args, **kwargs)

    return wrapper
601384
@Override
  public Runnable wrap(Runnable runnable) {
    if (isTracing()) {
      return new SpanContinuingTraceRunnable(this, this.traceKeys, this.spanNamer, runnable);
    }
    return runnable;
  }
240831
public static <E> Iterable<E> asIterable(final Iterator<E> iter) {
		return IterUtil.asIterable(iter);
	}
190554
static <T> ParallelFlowable<T> wrap(
            ParallelFlowable<T> source, Collection<ReactiveInstrumenter> instrumentations) {
        return new RxInstrumentedParallelFlowable<>(source, instrumentations);
    }
207194
static <T> CloseableIterator<T> wrap(final Iterator<T> iterator, final AutoCloseable closeable) {
        return new CloseableIterator<T>() {

            @Override
            public void close() {
                try {
                    closeable.close();
                } catch (RuntimeException re) {
                    throw re;
                } catch (Exception e) {
                    throw new IllegalStateException(e);
                }
            }

            @Override
            public boolean hasNext() {
                return iterator.hasNext();
            }

            @Override
            public T next() {
                return iterator.next();
            }

            @Override
            public void remove() {
                iterator.remove();
            }
        };
    }
1370894
public static StaticCapableStubber doReturn(Object toBeReturned, Object... toBeReturnedNext) {
        return new StaticCapableStubber(Mockito.doReturn(toBeReturned, toBeReturnedNext));
    }
1171996
public static <T> LazyIterable<T> select(Iterable<T> iterable, Predicate<? super T> predicate)
    {
        return new SelectIterable<T>(iterable, predicate);
    }
1297689
public static <T> CloseableIterator<T> singletonIterator(T value) {
        return fromIterator(Iterators.singletonIterator(value));
    }
465645
@SuppressWarnings("unchecked")
	public static <T extends EntityModel<S>, S> CollectionModel<T> wrap(Iterable<S> content) {

		Assert.notNull(content, "Content must not be null!");

		ArrayList<T> resources = new ArrayList<>();

		for (S element : content) {
			resources.add((T) new EntityModel<>(element));
		}

		return new CollectionModel<>(resources);
	}
1010699
@SuppressWarnings("unchecked")
	@Nullable
	public EmbeddedWrapper wrap(@Nullable Object source, LinkRelation rel) {

		if (source == null) {
			return null;
		}

		if (source instanceof EmbeddedWrapper) {
			return (EmbeddedWrapper) source;
		}

		if (source instanceof Collection) {
			return new EmbeddedCollection((Collection<Object>) source, rel);
		}

		if (preferCollections) {
			return new EmbeddedCollection(Collections.singleton(source), rel);
		}

		return new EmbeddedElement(source, rel);
	}
119106
@SafeVarargs
    public final FluentCloseableIterable<T> append(T... elements) {
        return from(wrap(Iterables.concat(this, asList(elements)), this));
    }
566867
public static Iterable<Object> subIterable(Object iterable, int fromIndex) {
    if (iterable == null || getLength(iterable) < fromIndex)
      return Collections.emptyList();

    final Iterator<Object> iterator = iterator(iterable);
    for (int i = 0; i < fromIndex; i++)
      iterator.next();
    return new Iterable<Object>() {
      @Override
      public Iterator<Object> iterator() {
        return iterator;
      }
    };
  }
599757
@Deprecated
    public static <T> CloseableIterable<T> wrap(final Iterable<T> iterable) {
        return fromIterable(iterable);
    }