Package com.twelvemonkeys.util
Interface DuplicateHandler<T>
public interface DuplicateHandler<T>
DuplicateHandler
- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/util/DuplicateHandler.java#2 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DuplicateHandler
<?> Converts duplicats to anObject
array.static final DuplicateHandler
<String> Converts duplicates to a comma-separatedString
.static final DuplicateHandler
<?> Will use the first (old) value.static final DuplicateHandler
<?> Will use the last (new) value. -
Method Summary
-
Field Details
-
USE_FIRST_VALUE
Will use the first (old) value. Any new values will be discarded.- See Also:
-
USE_LAST_VALUE
Will use the last (new) value. Any old values will be discarded (overwritten).- See Also:
-
DUPLICATES_AS_ARRAY
Converts duplicats to anObject
array.- See Also:
-
DUPLICATES_AS_CSV
Converts duplicates to a comma-separatedString
. Note that all values should allready beString
s if using this handler.- See Also:
-
-
Method Details
-
resolve
Resolves duplicates according to a certain strategy.- Parameters:
pOld
- the old valuepNew
- the new value- Returns:
- the resolved value.
- Throws:
IllegalArgumentException
- is the arguments cannot be resolved for some reason.
-