Package org.assertj.core.data
Class TemporalUnitWithinOffset
java.lang.Object
org.assertj.core.data.TemporalUnitOffset
org.assertj.core.data.TemporalUnitWithinOffset
- All Implemented Interfaces:
TemporalOffset<Temporal>
TemporalUnitOffset with less than or equal condition.- Since:
- 3.7.0
-
Field Summary
Fields inherited from class org.assertj.core.data.TemporalUnitOffset
unit, value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBeyondOffsetDifferenceDescription(Temporal temporal1, Temporal temporal2) Returns description of the difference between temporal values and expected offset details.booleanisBeyondOffset(Temporal temporal1, Temporal temporal2) Checks if difference between temporal values is less then or equal to offset.Methods inherited from class org.assertj.core.data.TemporalUnitOffset
equals, getAbsoluteDuration, getDifference, getUnit, hashCode
-
Constructor Details
-
TemporalUnitWithinOffset
-
-
Method Details
-
isBeyondOffset
Checks if difference between temporal values is less then or equal to offset.- Parameters:
temporal1- first temporal value to be validated against second temporal value.temporal2- second temporal value.- Returns:
- true if difference between temporal values is more than offset value.
-
getBeyondOffsetDifferenceDescription
Returns description of the difference between temporal values and expected offset details. Is designed for the case when difference is beyond offset.- Specified by:
getBeyondOffsetDifferenceDescriptionin interfaceTemporalOffset<Temporal>- Overrides:
getBeyondOffsetDifferenceDescriptionin classTemporalUnitOffset- Parameters:
temporal1- first temporal value which is being validated against second temporal value.temporal2- second temporal value.- Returns:
- difference description.
-