Package org.assertj.core.data
Class TemporalUnitLessThanOffset
- java.lang.Object
-
- org.assertj.core.data.TemporalUnitOffset
-
- org.assertj.core.data.TemporalUnitLessThanOffset
-
- All Implemented Interfaces:
TemporalOffset<Temporal>
public class TemporalUnitLessThanOffset extends TemporalUnitOffset
TemporalUnitOffset
with strict less than condition.- Since:
- 3.7.0
-
-
Field Summary
-
Fields inherited from class org.assertj.core.data.TemporalUnitOffset
unit, value
-
-
Constructor Summary
Constructors Constructor Description TemporalUnitLessThanOffset(long value, TemporalUnit unit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBeyondOffsetDifferenceDescription(Temporal temporal1, Temporal temporal2)
Returns description of the difference between temporal values and expected offset details.boolean
isBeyondOffset(Temporal temporal1, Temporal temporal2)
Checks if difference between temporal values is less then offset.-
Methods inherited from class org.assertj.core.data.TemporalUnitOffset
getAbsoluteDuration, getDifference, getUnit
-
-
-
-
Constructor Detail
-
TemporalUnitLessThanOffset
public TemporalUnitLessThanOffset(long value, TemporalUnit unit)
-
-
Method Detail
-
isBeyondOffset
public boolean isBeyondOffset(Temporal temporal1, Temporal temporal2)
Checks if difference between temporal values is less then 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 or equal to offset value.
-
getBeyondOffsetDifferenceDescription
public String getBeyondOffsetDifferenceDescription(Temporal temporal1, Temporal temporal2)
Returns description of the difference between temporal values and expected offset details. Is designed for the case when difference is beyond offset.- Specified by:
getBeyondOffsetDifferenceDescription
in interfaceTemporalOffset<Temporal>
- Overrides:
getBeyondOffsetDifferenceDescription
in classTemporalUnitOffset
- Parameters:
temporal1
- first temporal value which is being validated against second temporal value.temporal2
- second temporal value.- Returns:
- difference description.
-
-