public class MergeStrategy extends Object
Modifier and Type | Field and Description |
---|---|
static MergeStrategy |
OVERWRITE
Overwrite strategy adds items from the right, and overwrites duplicates.
|
static MergeStrategy |
PRESERVE
Preserve strategy only adds items from the right.
|
Constructor and Description |
---|
MergeStrategy() |
Modifier and Type | Method and Description |
---|---|
int |
inBoth(AbstractMergeSet set,
MergePair pair)
Deal with merging an element appears in both sets.
|
int |
inLeft(AbstractMergeSet set,
Element element)
Deal with merging an element that only appears in the left set.
|
int |
inRight(AbstractMergeSet set,
Element element)
Deal with merging an element that only appears in the right set.
|
public static final MergeStrategy PRESERVE
public static final MergeStrategy OVERWRITE
public int inLeft(AbstractMergeSet set, Element element)
set
- in the calling MergeSetelement
- in the item present only in the left setpublic int inRight(AbstractMergeSet set, Element element)
set
- in the calling MergeSetelement
- in the item present only in the left setpublic int inBoth(AbstractMergeSet set, MergePair pair)
set
- in the calling MergeSetpair
- the pair of itemsCopyright © 2004-2013 Codehaus. All Rights Reserved.