Class DurationUtil
java.lang.Object
org.springframework.data.mongodb.util.DurationUtil
Helper to evaluate Duration from expressions.
- Since:
- 4.4
- Author:
- Christoph Strobl
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Durationevaluate(String value, Supplier<EvaluationContext> evaluationContext) Evaluates and potentially parses the given string representation into aDurationvalue.static Durationevaluate(String value, ValueEvaluationContext evaluationContext) Evaluates and potentially parses the given string representation into aDurationvalue.static Duration
- 
Constructor Details- 
DurationUtilpublic DurationUtil()
 
- 
- 
Method Details- 
evaluateEvaluates and potentially parses the given string representation into aDurationvalue.- Parameters:
- value- the- Stringrepresentation of the duration to evaluate.
- evaluationContext- context supplier for property and expression language evaluation.
- Returns:
- the evaluated duration.
 
- 
evaluateEvaluates and potentially parses the given string representation into aDurationvalue.- Parameters:
- value- the- Stringrepresentation of the duration to evaluate.
- evaluationContext- context supplier for expression language evaluation.
- Returns:
- the evaluated duration.
 
- 
parse- Parameters:
- duration- duration string to parse.
- Returns:
- parsed Duration.
- See Also:
 
 
-