Class RuleMatcher

java.lang.Object
ke.ric.cooking.data.RuleMatcher

public class RuleMatcher extends Object
A rule matcher containing one direct identity/tag or a list of alternatives.
  • Method Details

    • getItem

      public String getItem()
    • setItem

      public void setItem(String item)
    • getCustomItem

      public String getCustomItem()
    • setCustomItem

      public void setCustomItem(String customItem)
    • getCustomTag

      public String getCustomTag()
    • setCustomTag

      public void setCustomTag(String customTag)
      Uses the same normalization and blank-value rejection as ingredient tags.
    • getProviderItem

      public String getProviderItem()
    • setProviderItem

      public void setProviderItem(String providerItem)
    • getProviderItemRef

      public ProviderItemRef getProviderItemRef()
    • getItemRef

      public RecipeItemRef getItemRef()
    • setItemRef

      public void setItemRef(RecipeItemRef itemRef)
    • getOptions

      public List<IngredientOption> getOptions()
    • setOptions

      public void setOptions(List<IngredientOption> options)
    • validateDefinition

      public void validateDefinition()
      Enforce exactly one completed matcher alternative at parser/builder boundaries.
    • matches

      public boolean matches(String itemId, boolean isCustom)
      Check if this matcher matches the given legacy item description.
    • matches

      public boolean matches(CraftingInput input)
      Check a full crafting input so tags and provider identities stay exact.
    • matchesAny

      public boolean matchesAny(List<CraftingInput> inputs)
    • toString

      public String toString()
      Overrides:
      toString in class Object