net.sf.javagimmicks.collections.transformer.TransformingRing 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 net.sf.javagimmicks.collections.AbstractRing;
import net.sf.javagimmicks.collections.Ring;
import net.sf.javagimmicks.collections.RingCursor;
import net.sf.javagimmicks.transform.Transforming;
import net.sf.javagimmicks.util.Function;
class TransformingRing
extends AbstractRing
implements Transforming
{
protected final Ring _internalRing;
private final Function _tansformer;
/**
* @deprecated Use TranformerUtils.decorate() instead
*/
@Deprecated
public TransformingRing(Ring ring, Function tansformer)
{
_internalRing = ring;
_tansformer = tansformer;
}
public Function getTransformerFunction()
{
return _tansformer;
}
public RingCursor cursor()
{
return TransformerUtils.decorate(_internalRing.cursor(), getTransformerFunction());
}
@Override
public int size()
{
return _internalRing.size();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy