Class PlaceholderConditionEvaluator
java.lang.Object
com.ordwen.odailyquests.quests.conditions.placeholder.PlaceholderConditionEvaluator
Utility class that evaluates placeholder conditions of different types.
A condition compares a placeholder value with an expected value using
operators such as equality, numeric comparison, or duration comparison.
The evaluator attempts to parse the values into the appropriate type
(string, number, or duration) and returns a PlaceholderConditionResult
describing whether the comparison matched or failed, or whether the format
of the inputs was invalid.
This class is not meant to be instantiated; all methods are static.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PlaceholderConditionResult
evaluate
(ConditionOperator type, String placeholderValue, String expectedValue) Evaluates a condition of the given type by comparing a placeholder value with an expected value.
-
Method Details
-
evaluate
public static PlaceholderConditionResult evaluate(ConditionOperator type, String placeholderValue, String expectedValue) Evaluates a condition of the given type by comparing a placeholder value with an expected value. Supports string equality, numeric comparison, and duration comparison.- Parameters:
type
- the type of condition to evaluateplaceholderValue
- the actual placeholder value (string form)expectedValue
- the expected value (string form)- Returns:
- a result indicating whether the condition matched, failed, or could not be evaluated due to invalid input format
-