Constructor and Description |
---|
CollectorContext() |
Modifier and Type | Method and Description |
---|---|
<E> void |
add(String name,
Collector<E> collector)
Adds a collector with give name.
|
<E> void |
add(String name,
Object object)
Adds a collector or a simple object with give name.
|
void |
combineWithCollector(String name,
Object data)
Combines data with Collector identified by the given name.
|
Object |
get(String name)
Gets the data associated with a given name.
|
static CollectorContext |
getInstance() |
public static CollectorContext getInstance()
public <E> void add(String name, Collector<E> collector)
E
- elementname
- Stringcollector
- Collectorpublic <E> void add(String name, Object object)
E
- elementobject
- Objectname
- Stringpublic Object get(String name)
For a Collector, this method will return the collector as long as load method is not called. Once the load method is called this method will return the actual data collected by collector.
name
- StringCopyright © 2020. All rights reserved.