public class DeduplicatingItemIdMergeStrategy extends Object implements CollectionMergeStrategy
| Constructor and Description |
|---|
DeduplicatingItemIdMergeStrategy() |
| Modifier and Type | Method and Description |
|---|---|
private <T> void |
merge(HashSet<ItemId> presentItemIds,
Collection<Item<T>> target,
Collection<Item<T>> sourceItems)
Adds source items to the target collection if none of the Items in the target collection have the same
ItemId as source item. |
<T> void |
mergeCollection(Collection<Item<T>> target,
List<Collection<Item<T>>> sources)
Merges the results of each child pipeline in to the collection of Item given to this stage.
|
public <T> void mergeCollection(@Nonnull@NonnullElements Collection<Item<T>> target, @Nonnull@NonnullElements List<Collection<Item<T>>> sources)
mergeCollection in interface CollectionMergeStrategyT - type of data contained in the itemstarget - collection in to which all the Items should be merged, never nullsources - collections of Items to be merged in to the target, never null not containing any null elementsprivate <T> void merge(@Nonnull@NonnullElements HashSet<ItemId> presentItemIds, @Nonnull@NonnullElements Collection<Item<T>> target, @Nonnull@NonnullElements Collection<Item<T>> sourceItems)
ItemId as source item. If the source item does not contain a ItemId it is always added to the
target collection.T - type of data contained in the itemspresentItemIds - IDs that are already present in the target collectiontarget - the collection to which items will be merged in tosourceItems - the collection of items to be merged in to the targetCopyright © 1999–2016. All rights reserved.