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

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

    • INHERIT

      public static final OverwriteStrategy.Collection INHERIT
      No explicit overwrite strategy is set.
    • ADD

      public static final OverwriteStrategy.Collection ADD
      The members of the copy source are added to the target collection. Potential item replacements are handled by the target collection (like Set)
    • REPLACE

      public static final OverwriteStrategy.Collection REPLACE
      The collection is fully replaced if the replacement is not empty.
    • SET_IF_EMPTY

      public static final OverwriteStrategy.Collection SET_IF_EMPTY
      The collection is fully replaced only if target has now elements.
    • ALWAYS_REPLACE

      public static final OverwriteStrategy.Collection ALWAYS_REPLACE
      The map is replaced even if the copy source is empty.
  • Method Details

    • values

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