| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package com.google.common.collect.testing; |
| 18 |
|
| 19 |
import com.google.common.annotations.GwtCompatible; |
| 20 |
import java.util.Iterator; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
@GwtCompatible |
| 28 |
public final class DerivedTestIteratorGenerator<E> |
| 29 |
implements TestIteratorGenerator<E>, DerivedGenerator { |
| 30 |
private final TestSubjectGenerator<? extends Iterable<E>> collectionGenerator; |
| 31 |
|
| 32 |
public DerivedTestIteratorGenerator( |
| 33 |
TestSubjectGenerator<? extends Iterable<E>> collectionGenerator) { |
| 34 |
this.collectionGenerator = collectionGenerator; |
| 35 |
} |
| 36 |
|
| 37 |
@Override |
| 38 |
public TestSubjectGenerator<? extends Iterable<E>> getInnerGenerator() { |
| 39 |
return collectionGenerator; |
| 40 |
} |
| 41 |
|
| 42 |
@Override |
| 43 |
public Iterator<E> get() { |
| 44 |
return collectionGenerator.createTestSubject().iterator(); |
| 45 |
} |
| 46 |
} |