Package io.github.arthurhoch.kissconfig
Enum Class MergeStrategy
- All Implemented Interfaces:
Serializable,Comparable<MergeStrategy>,Constable
Defines how values from later sources interact with values already loaded from earlier sources.
SearchOrder is read order. With FILL_MISSING_ONLY, the first source wins.
With OVERRIDE_EXISTING, the last source wins. With FAIL_ON_DUPLICATE,
duplicate canonical keys fail. See docs/merge-strategy.md for examples.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFail when a canonical key appears more than once.Keep the first value for a canonical key.Replace an existing value when a later source contains the same canonical key. -
Method Summary
Modifier and TypeMethodDescriptionstatic MergeStrategyReturns the enum constant of this class with the specified name.static MergeStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FILL_MISSING_ONLY
Keep the first value for a canonical key. Later sources only add missing keys. -
OVERRIDE_EXISTING
Replace an existing value when a later source contains the same canonical key. -
FAIL_ON_DUPLICATE
Fail when a canonical key appears more than once.
-
-
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
-