org.fusesource.common.util
Class Collectors<T>

java.lang.Object
  extended by org.fusesource.common.util.Collectors<T>
All Implemented Interfaces:
Collector<T>

public class Collectors<T>
extends java.lang.Object
implements Collector<T>

A container for multiple Collector instances that just aggregates the collected results from all collectors it contains


Constructor Summary
Collectors()
           
Collectors(Collector<T>... collectors)
           
 
Method Summary
 void addCollection(java.util.Collection<T> items)
          Convenience method for adding an existing collection to the collector directly
 void addCollector(Collector<T> collector)
           
 java.util.Collection<T> getCollection()
          Access the collection of items gathered by this collector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Collectors

public Collectors()

Collectors

public Collectors(Collector<T>... collectors)
Method Detail

addCollector

public void addCollector(Collector<T> collector)

getCollection

public java.util.Collection<T> getCollection()
Description copied from interface: Collector
Access the collection of items gathered by this collector

Specified by:
getCollection in interface Collector<T>
Returns:
the collection of items

addCollection

public void addCollection(java.util.Collection<T> items)
Convenience method for adding an existing collection to the collector directly

Parameters:
items - the collection to be added


Copyright © 2012 FuseSource. All Rights Reserved.