public ObjectIterator<BitVector> iterator() { return new IteratorWrapper<T>( collection.iterator(), transformationStrategy.copy() ); } }
public ObjectIterator<BitVector> iterator() { return new IteratorWrapper<T>( collection.iterator(), transformationStrategy.copy() ); } }
/** Wraps a given iterator, returning an iterator that emits {@linkplain BitVector bit vectors}. * * @param iterator an iterator. * @param transformationStrategy a strategy to transform the object returned by <code>iterator</code>. * @return an iterator that emits the content of <code>iterator</code> passed through <code>transformationStrategy</code>. */ @SuppressWarnings("unchecked") public static <T> Iterator<BitVector> wrap( final Iterator<T> iterator, final TransformationStrategy<? super T> transformationStrategy ) { return (Iterator<BitVector>)( transformationStrategy == IDENTITY ? iterator : new IteratorWrapper<T>( iterator, transformationStrategy ) ); }
/** Wraps a given iterator, returning an iterator that emits {@linkplain BitVector bit vectors}. * * @param iterator an iterator. * @param transformationStrategy a strategy to transform the object returned by <code>iterator</code>. * @return an iterator that emits the content of <code>iterator</code> passed through <code>transformationStrategy</code>. */ @SuppressWarnings("unchecked") public static <T> Iterator<BitVector> wrap(final Iterator<T> iterator, final TransformationStrategy<? super T> transformationStrategy) { return (Iterator<BitVector>)(transformationStrategy == IDENTITY ? iterator : new IteratorWrapper<>(iterator, transformationStrategy)); }
/** Wraps a given iterator, returning an iterator that emits {@linkplain BitVector bit vectors}. * * @param iterator an iterator. * @param transformationStrategy a strategy to transform the object returned by <code>iterator</code>. * @return an iterator that emits the content of <code>iterator</code> passed through <code>transformationStrategy</code>. */ @SuppressWarnings("unchecked") public static <T> Iterator<BitVector> wrap( final Iterator<T> iterator, final TransformationStrategy<? super T> transformationStrategy ) { return (Iterator<BitVector>)( transformationStrategy == IDENTITY ? iterator : new IteratorWrapper<T>( iterator, transformationStrategy ) ); }
@Override public ObjectIterator<BitVector> iterator() { return new IteratorWrapper<>(collection.iterator(), transformationStrategy.copy()); } }