This project has retired. For details please refer to its Attic page.
SingleUseIterable (Apache Crunch 0.10.0 API)

org.apache.crunch.impl
Class SingleUseIterable<T>

java.lang.Object
  extended by org.apache.crunch.impl.SingleUseIterable<T>
All Implemented Interfaces:
Iterable<T>

public class SingleUseIterable<T>
extends Object
implements Iterable<T>

Wrapper around a Reducer's input Iterable. Ensures that the iterator() method is not called more than once.


Constructor Summary
SingleUseIterable(Iterable<T> toWrap)
          Instantiate around an Iterable that may only be used once.
 
Method Summary
 Iterator<T> iterator()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleUseIterable

public SingleUseIterable(Iterable<T> toWrap)
Instantiate around an Iterable that may only be used once.

Parameters:
toWrap - iterable to wrap
Method Detail

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.