net.sf.javagimmicks.collections.transformer.TransformingCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gimmicks Show documentation
Show all versions of gimmicks Show documentation
Utility classes, APIs and tools for Java
package net.sf.javagimmicks.collections.transformer;
import java.util.AbstractCollection;
import java.util.Collection;
import java.util.Iterator;
import net.sf.javagimmicks.transform.Transformer;
import net.sf.javagimmicks.transform.Transforming;
class TransformingCollection
extends AbstractCollection
implements Transforming
{
protected final Collection _internalCollection;
private final Transformer _transformer;
/**
* @deprecated Use TranformerUtils.decorate() instead
*/
@Deprecated
public TransformingCollection(Collection collection, Transformer transformer)
{
_internalCollection = collection;
_transformer = transformer;
}
public Transformer getTransformer()
{
return _transformer;
}
@Override
public Iterator iterator()
{
return TransformerUtils.decorate(_internalCollection.iterator(), getTransformer());
}
@Override
public int size()
{
return _internalCollection.size();
}
@Override
public void clear()
{
_internalCollection.clear();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy