Package com.blackbuild.klum.ast.copy
Enum Class OverwriteStrategy.Collection
java.lang.Object
java.lang.Enum<OverwriteStrategy.Collection>
com.blackbuild.klum.ast.copy.OverwriteStrategy.Collection
- All Implemented Interfaces:
Serializable,Comparable<OverwriteStrategy.Collection>,Constable
- Enclosing interface:
- OverwriteStrategy
Defines the strategy for a collection.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe members of the copy source are added to the target collection.The map is replaced even if the copy source is empty.No explicit overwrite strategy is set.The collection is fully replaced if the replacement is not empty.The collection is fully replaced only if target has now elements. -
Method Summary
Modifier and TypeMethodDescriptionstatic OverwriteStrategy.CollectionReturns the enum constant of this class with the specified name.static OverwriteStrategy.Collection[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INHERIT
No explicit overwrite strategy is set. -
ADD
The members of the copy source are added to the target collection. Potential item replacements are handled by the target collection (likeSet) -
REPLACE
The collection is fully replaced if the replacement is not empty. -
SET_IF_EMPTY
The collection is fully replaced only if target has now elements. -
ALWAYS_REPLACE
The map is replaced even if the copy source is empty.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-