The following document contains the results of PMD's CPD 4.1.
| File | Line |
|---|---|
| org/apache/commons/functor/generator/GenerateUntil.java | 36 |
| org/apache/commons/functor/generator/GenerateWhile.java | 36 |
public GenerateWhile(Generator<? extends E> wrapped, UnaryPredicate<? super E> test) {
super(wrapped);
if (wrapped == null) {
throw new IllegalArgumentException("Generator argument was null");
}
if (test == null) {
throw new IllegalArgumentException("UnaryPredicate argument was null");
}
this.test = test;
}
/**
* {@inheritDoc}
*/
public void run(final UnaryProcedure<? super E> proc) {
getWrappedGenerator().run(new UnaryProcedure<E>() {
public void run(E obj) {
proc.run(obj);
if (!test.test(obj)) { | |