Returns a funnel that processes an {@code Iterable} by funneling its elements in iteration
order with the specified funnel. No separators are added between the elements.

@since 15.0
489755
public static <E> Funnel<Iterable<? extends E>> sequentialFunnel(Funnel<E> elementFunnel) {
    return new SequentialFunnel<E>(elementFunnel);
  }
1063698
@NonNull
    @Override
    public Iterator<Map.Entry<K, V>> iterator() {
        ListIterator<K, V> iterator = new AscendingIterator<>(mStart, mEnd);
        mIterators.put(iterator, false);
        return iterator;
    }
819938
@Pure
	public Iterable<IntegerSegment> toSegmentIterable() {
		return new Iterable<IntegerSegment>() {
			@Override
			public Iterator<IntegerSegment> iterator() {
				return new SegmentIterator();
			}
		};
	}
91717
@SuppressWarnings("unchecked")
    public <U> SimpleReactStream<U> fromIterable(final Iterable<U> iter) {
        if(iter instanceof SimpleReactStream){
            return (SimpleReactStream<U>)iter;
        }
        return this.from(StreamSupport.stream(Spliterators.spliteratorUnknownSize(iter.iterator(), Spliterator.ORDERED), false));

    }
1226232
Iterator<Path> dirIterator() {
    if (dataset.getDescriptor().isPartitioned()) {
      return Iterators.transform(partitionIterator(), new Function<StorageKey, Path>() {
        @Override
        @edu.umd.cs.findbugs.annotations.SuppressWarnings(
            value="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE",
            justification="False positive, initialized above as non-null.")
        public Path apply(@Nullable StorageKey key) {
          return new Path(root, key.getPath());
        }
      });
    } else {
      return Iterators.singletonIterator(root);
    }
  }
911090
@SuppressWarnings("unchecked")
  public static Iterator<Object> iterator(Object iterable) {
    Assert.state(isIterable(iterable.getClass()));
    return iterable.getClass().isArray() ? new ArrayIterator(iterable)
        : ((Iterable<Object>) iterable).iterator();
  }
1113349
public static <E> Iterator<E> cycle(Iterable<E> iterable) {
        dbc.precondition(iterable != null, "cannot cycle a null iterable");
        return new CyclicIterator<E>(iterable.iterator());
    }
999724
public static <T> Iterable<T> concat(final Iterable<? extends Iterable<? extends T>> iterables) {
        return () -> Iterators.concat(iterators(iterables));
    }
628592
public static <E> E first(Iterable<E> iterable) {
        dbc.precondition(iterable != null, "cannot call first with a null iterable");
        return new FirstElement<E>().apply(iterable.iterator());
    }
303521
public java.lang.Iterable<?> getIterable(KProcess process) {
			// try new one
			java.lang.Iterable<?> iterable = null;
			try {
				iterable = (java.lang.Iterable<?>) this.field.get(process
						.getContext());
			} catch (IllegalArgumentException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		return iterable;
	}
424925
public static Object getFirstElement(Object maybeIterable) {
    if (!(maybeIterable instanceof Iterable<?>)) return null;
    Iterable<?> iterable = (Iterable<?>) maybeIterable;
    Iterator<?> iterator = iterable.iterator();
    return iterator.hasNext() ? iterator.next() : null;
  }
478047
@Override
    public Iterable<IChemModel> chemModels() {
        return new Iterable<IChemModel>() {

            @Override
            public Iterator<IChemModel> iterator() {
                return new ChemModelIterator();
            }
        };
    }
833364
public static <T> CloseableIterable<T> fromIterable(Iterable<T> iterable) {
        requireNonNull(iterable);
        if (iterable instanceof CloseableIterable) return (CloseableIterable<T>) iterable;

        return new FluentCloseableIterable<T>() {
            @Override
            protected void doClose() {
                if (iterable instanceof AutoCloseable) {
                    try {
                        ((AutoCloseable) iterable).close();
                    } catch (RuntimeException re) {
                        throw re;
                    } catch (Exception e) {
                        throw new IllegalStateException(e);
                    }
                }
            }

            @Override
            protected Iterator<T> retrieveIterator() {
                return iterable.iterator();
            }
        };
    }
224435
public Iterator iterator() {
        return new Iterator() {
            private LeftTupleSinkNode currentNode = null;
            private LeftTupleSinkNode nextNode    = getFirst();

            public boolean hasNext() {
                return (this.nextNode != null);
            }

            public Object next() {
                this.currentNode = this.nextNode;
                if ( this.currentNode != null ) {
                    this.nextNode = this.currentNode.getNextLeftTupleSinkNode();
                } else {
                    throw new NoSuchElementException( "No more elements to return" );
                }
                return this.currentNode;
            }

            public void remove() {
                if ( this.currentNode != null ) {
                    LeftTupleSinkNodeList.this.remove( this.currentNode );
                    this.currentNode = null;
                } else {
                    throw new IllegalStateException( "No item to remove. Call next() before calling remove()." );
                }
            }
        };
    }
342636
@Override
  public Iterator<Counter> iterator() {
    return new Iterator<Counter>() {
      private Iterator<Map.Entry<String,Map<String,Counter>>> groupIter =
          internalMap.entrySet().iterator();
      private Iterator<Map.Entry<String,Counter>> currentGroupIter = null;

      @Override
      public boolean hasNext() {
        // advance current group if necessary
        if ((currentGroupIter == null || !currentGroupIter.hasNext()) && groupIter.hasNext()) {
          currentGroupIter = groupIter.next().getValue().entrySet().iterator();
        }
        return currentGroupIter != null && currentGroupIter.hasNext();
      }

      @Override
      public Counter next() {
        if (!hasNext()) {
          throw new NoSuchElementException("No more elements in iterator");
        }
        return currentGroupIter.next().getValue();
      }

      @Override
      public void remove() {
        throw new UnsupportedOperationException("remove() is not supported by CounterMap");
      }
    };
  }
622066
public Iterable<T> filter(final Iterable<T> iterable) {
        return new Iterable<T>() {

            @Override
            public Iterator<T> iterator() {
                return filter(iterable.iterator());
            }
        };
    }
377340
public static scala.collection.Iterable linkedListToScalaIterable(LinkedList<?> linkedList) {
        return JavaConverters.asScalaIterableConverter(linkedList).asScala();
    }