Interface ConfigSpec.CorrectionListener
-
- Enclosing class:
- ConfigSpec
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface ConfigSpec.CorrectionListenerListens to the corrections made by the methodsConfigSpec.correct(Config)andConfigSpec.correct(Config, CorrectionListener).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCorrect(ConfigSpec.CorrectionAction action, java.util.List<java.lang.String> path, java.lang.Object incorrectValue, java.lang.Object correctedValue)Called when a config value is added, modified or removed by the correction.
-
-
-
Method Detail
-
onCorrect
void onCorrect(ConfigSpec.CorrectionAction action, java.util.List<java.lang.String> path, java.lang.Object incorrectValue, java.lang.Object correctedValue)
Called when a config value is added, modified or removed by the correction.- Parameters:
action- the action that was taken.path- the path of the value, unmodifiable.incorrectValue- the old, incorrect value. May be null if the value didn't exist before the correction, or if the value was actually null.correctedValue- the new, corrected value. May be null if the value has been removed by the correction, or if the default value in the specification is null.
-
-