public class DefaultBagFactory extends BagFactory
Modifier and Type | Method and Description |
---|---|
DataBag |
newDefaultBag()
Get a default (unordered, not distinct) data bag.
|
DataBag |
newDefaultBag(List<Tuple> listOfTuples)
Get a default (unordered, not distinct) data bag from
an existing list of tuples.
|
DataBag |
newDistinctBag()
Get a distinct data bag.
|
DataBag |
newLimitedSortedBag(Comparator<Tuple> comp,
long limit)
Get a limited sorted data bag.
|
DataBag |
newSortedBag(Comparator<Tuple> comp)
Get a sorted data bag.
|
getInstance, registerBag, resetSelf
public DataBag newDefaultBag()
newDefaultBag
in class BagFactory
public DataBag newDefaultBag(List<Tuple> listOfTuples)
newDefaultBag
in class BagFactory
listOfTuples
- list of tuples to be placed in the bag. This list may not be
copied, it may be used directly by the created bag.public DataBag newLimitedSortedBag(Comparator<Tuple> comp, long limit)
newLimitedSortedBag
in class BagFactory
comp
- Comparator that controls how the data is sorted.
If null, default comparator will be used.limit
- max number of tuples in bagpublic DataBag newSortedBag(Comparator<Tuple> comp)
newSortedBag
in class BagFactory
comp
- Comparator that controls how the data is sorted.
If null, default comparator will be used.public DataBag newDistinctBag()
newDistinctBag
in class BagFactory
Copyright © 2007-2017 The Apache Software Foundation