Enum Class OverwriteStrategy.Map

java.lang.Object
java.lang.Enum<OverwriteStrategy.Map>
com.blackbuild.klum.ast.copy.OverwriteStrategy.Map
All Implemented Interfaces:
Serializable, Comparable<OverwriteStrategy.Map>, Constable
Enclosing interface:
OverwriteStrategy

public static enum OverwriteStrategy.Map extends Enum<OverwriteStrategy.Map>
Defines the strategy for a map.
  • Enum Constant Details

    • INHERIT

      public static final OverwriteStrategy.Map INHERIT
      No explicit overwrite strategy is set.
    • FULL_REPLACE

      public static final OverwriteStrategy.Map FULL_REPLACE
      The map is fully replaced if the replacement is not empty.
    • ALWAYS_REPLACE

      public static final OverwriteStrategy.Map ALWAYS_REPLACE
      The map is replaced even if the copy source is empty.
    • SET_IF_EMPTY

      public static final OverwriteStrategy.Map SET_IF_EMPTY
      The map is replaced only if the target map is empty.
    • MERGE_KEYS

      public static final OverwriteStrategy.Map MERGE_KEYS
      The members of the copy source are added to the target map. Members with the same keys are replaced.
    • MERGE_VALUES

      public static final OverwriteStrategy.Map MERGE_VALUES
      The members of the copy source are added to the target map. Members with the same keys are merged. Only valid for DSL elements.
    • ADD_MISSING

      public static final OverwriteStrategy.Map ADD_MISSING
      The members of the copy source are added to the target map. Members with the existing keys are ignored.
  • Method Details

    • values

      public static OverwriteStrategy.Map[] 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

      public static OverwriteStrategy.Map valueOf(String name)
      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 name
      NullPointerException - if the argument is null