net.sf.javagimmicks.collections.transformer.TransformingSet 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.AbstractSet;
import java.util.Iterator;
import java.util.Set;
import net.sf.javagimmicks.transform.Transforming;
import net.sf.javagimmicks.util.Function;
class TransformingSet
extends AbstractSet
implements Transforming
{
protected final Set _internalSet;
private final Function _transformer;
/**
* @deprecated Use TranformerUtils.decorate() instead
*/
@Deprecated
public TransformingSet(Set set, Function transformer)
{
_internalSet = set;
_transformer = transformer;
}
public Function getTransformerFunction()
{
return _transformer;
}
@Override
public Iterator iterator()
{
return TransformerUtils.decorate(_internalSet.iterator(), getTransformerFunction());
}
@Override
public int size()
{
return _internalSet.size();
}
@Override
public void clear()
{
_internalSet.clear();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy