T - public abstract class Mapper<T> extends Object
T objects and modifying it
somehow (e.g. by filtering or modifying some objects). A Mapper
object has two states: enabled and disabled. If the Mapper is
disabled, it will return the stream of objects unmodified.
Subclasses extending Mapper should implement the
doMap(Iterable objects) method.| Constructor and Description |
|---|
Mapper() |
protected abstract Iterable<T> doMap(Iterable<T> objects)
objects - a stream of objectspublic Iterable<T> map(Iterable<T> objects)
objects - a stream of objectspublic boolean isEnabled()
true if this mapper is enabled.public void disable()
public void enable()
Copyright © 2010-2013 University of Washington CSE. All Rights Reserved.