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>

public static class ListItemProcessor.ProcessResult<T> extends Object
Result of processing a list item.
  • Method Details

    • ok

      public static <T> ListItemProcessor.ProcessResult<T> ok(T value)
      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

      public static <T> ListItemProcessor.ProcessResult<T> modified(T value)
      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

      public static <T> ListItemProcessor.ProcessResult<T> 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