Package me.a8kj.config.file.operation
Interface ConfigOperation<K>
- Type Parameters:
K- the type of data keys used in the configuration file.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface representing a single operation to be performed on a
ConfigFile.
This follows the Command Pattern, allowing various actions (like CRUD) to be encapsulated
and passed around as objects.- Since:
- 0.1
- Author:
- a8kj7sea
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(ConfigFile<K> config) Executes the specific logic of the operation on the provided configuration file.default StringgetName()Returns a human-readable name for the operation, primarily used for logging and debugging.
-
Method Details
-
execute
Executes the specific logic of the operation on the provided configuration file.- Parameters:
config- theConfigFileinstance to operate on.- Throws:
IOException- if an I/O error occurs during the operation execution.- Since:
- 0.1
-
getName
Returns a human-readable name for the operation, primarily used for logging and debugging. By default, it returns "AnonymousProcess" for lambdas or anonymous classes, and the simple class name for concrete implementations.- Returns:
- the string name of the operation.
- Since:
- 0.1
-