Class ListItemProcessor.ProcessResult<T>
java.lang.Object
dev.ua.theroer.magicutils.config.annotations.ListItemProcessor.ProcessResult<T>
- Type Parameters:
T- the type of the item
- Enclosing interface:
ListItemProcessor<T>
Result of processing a list item.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ListItemProcessor.ProcessResult<T> modified(T value) Creates a result indicating the item was modified to a new value.static <T> ListItemProcessor.ProcessResult<T> ok(T value) Creates a result indicating the item is valid as-is without modification.static <T> ListItemProcessor.ProcessResult<T> Creates a result indicating the item should be replaced with the default value.booleanChecks if the default value should be used instead of the processed value.
-
Method Details
-
ok
Creates a result indicating the item is valid as-is without modification.- Type Parameters:
T- the type of the item- Parameters:
value- the original item value- Returns:
- a ProcessResult indicating no changes are needed
-
modified
Creates a result indicating the item was modified to a new value.- Type Parameters:
T- the type of the item- Parameters:
value- the modified item value- Returns:
- a ProcessResult with the modified value
-
replaceWithDefault
Creates a result indicating the item should be replaced with the default value.- Type Parameters:
T- the type of the item- Returns:
- a ProcessResult indicating the default value should be used
-
shouldUseDefault
public boolean shouldUseDefault()Checks if the default value should be used instead of the processed value.- Returns:
- true if the default value should be used
-