PIP.Collections
Class UniformSampler<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by PIP.Collections.UniformSampler<E>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>

public class UniformSampler<E>
extends java.util.AbstractCollection<E>


Constructor Summary
UniformSampler(java.util.List<E> list, int s)
           
 
Method Summary
 E getSample()
           
 java.util.Iterator<E> iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

UniformSampler

public UniformSampler(java.util.List<E> list,
                      int s)
Method Detail

getSample

public E getSample()

iterator

public java.util.Iterator<E> iterator()
Specified by:
iterator in interface java.lang.Iterable<E>
Specified by:
iterator in interface java.util.Collection<E>
Specified by:
iterator in class java.util.AbstractCollection<E>

size

public int size()
Specified by:
size in interface java.util.Collection<E>
Specified by:
size in class java.util.AbstractCollection<E>