org.apache.mahout.common.iterator
Class FixedSizeSamplingIterator<T>

java.lang.Object
  extended by com.google.common.collect.ForwardingObject
      extended by com.google.common.collect.ForwardingIterator<T>
          extended by org.apache.mahout.common.iterator.FixedSizeSamplingIterator<T>
All Implemented Interfaces:
Iterator<T>

public final class FixedSizeSamplingIterator<T>
extends com.google.common.collect.ForwardingIterator<T>

Sample a fixed number of elements from an Iterator. The results can appear in any order.


Constructor Summary
FixedSizeSamplingIterator(int size, Iterator<T> source)
           
 
Method Summary
protected  Iterator<T> delegate()
           
 
Methods inherited from class com.google.common.collect.ForwardingIterator
hasNext, next, remove
 
Methods inherited from class com.google.common.collect.ForwardingObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FixedSizeSamplingIterator

public FixedSizeSamplingIterator(int size,
                                 Iterator<T> source)
Method Detail

delegate

protected Iterator<T> delegate()
Overrides:
delegate in class com.google.common.collect.ForwardingIterator<T>


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.