edu.washington.cs.knowitall.extractor.mapper
Class MapperList<T>
java.lang.Object
edu.washington.cs.knowitall.extractor.mapper.Mapper<T>
edu.washington.cs.knowitall.extractor.mapper.MapperList<T>
- Type Parameters:
T -
- Direct Known Subclasses:
- ReVerbArgument1Mappers, ReVerbArgument2Mappers, ReVerbRelationMappers
public class MapperList<T>
- extends Mapper<T>
A list of Mapper objects. Applies each mapper in the list to an input
stream of T objects in order.
- Author:
- afader
|
Constructor Summary |
MapperList()
Constructs an empty list of mappers. |
MapperList(List<Mapper<T>> mappers)
Constructs a new list of mappers from the given list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapperList
public MapperList()
- Constructs an empty list of mappers.
MapperList
public MapperList(List<Mapper<T>> mappers)
- Constructs a new list of mappers from the given list.
- Parameters:
mappers - another mapper list.
getMappers
public Iterable<Mapper<T>> getMappers()
- Returns:
- the
Mapper objects in this list.
addMapper
public void addMapper(Mapper<T> mapper)
- Adds a mapper to the end of the list. This mapper will be the last one
to be applied to the input stream of objects.
- Parameters:
mapper -
doMap
protected Iterable<T> doMap(Iterable<T> objects)
- Specified by:
doMap in class Mapper<T>
- Parameters:
objects - a stream of objects
- Returns:
- a modified stream of objects
Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.