1 package org.hamcrest.internal; 2 3 import java.util.Iterator; 4 5 import org.hamcrest.SelfDescribing; 6 7 public class SelfDescribingValueIterator<T> implements Iterator<SelfDescribing> { 8 private Iterator<T> values; 9 10 public SelfDescribingValueIterator(Iterator<T> values) { 11 this.values = values; 12 } 13 14 public boolean hasNext() { 15 return values.hasNext(); 16 } 17 18 public SelfDescribing next() { 19 return new SelfDescribingValue<T>(values.next()); 20 } 21 22 public void remove() { 23 values.remove(); 24 } 25 } 26