Top Description Fields Constructors Methods
org.assertj.core.data

public Class TemporalUnitWithinOffset

extends TemporalUnitOffset
Class Inheritance
Imports
java.time.Duration, java.time.temporal.Temporal, .TemporalUnit

TemporalUnitOffset with less than or equal condition.
Since
3.7.0

Field Summary

Inherited from org.assertj.core.data.TemporalUnitOffset:
unitvalue

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getBeyondOffsetDifferenceDescription(Temporal
first temporal value which is being validated against second temporal value.
temporal1
,
Temporal
second temporal value.
temporal2
)

Overrides org.assertj.core.data.TemporalUnitOffset.getBeyondOffsetDifferenceDescription.

Implements org.assertj.core.data.TemporalOffset.getBeyondOffsetDifferenceDescription.

Returns description of the difference between temporal values and expected offset details.
public boolean

Returns:

true if difference between temporal values is more than offset value.
isBeyondOffset
(Temporal
first temporal value to be validated against second temporal value.
temporal1
,
Temporal
second temporal value.
temporal2
)

Implements org.assertj.core.data.TemporalOffset.isBeyondOffset.

Checks if difference between temporal values is less then or equal to offset.
Inherited from org.assertj.core.data.TemporalUnitOffset:
equalsgetAbsoluteDurationgetDifferencegetUnithashCode

Constructor Detail

TemporalUnitWithinOffsetback to summary
public TemporalUnitWithinOffset(long value, TemporalUnit unit)

Method Detail

getBeyondOffsetDifferenceDescriptionback to summary
public String getBeyondOffsetDifferenceDescription(Temporal temporal1, Temporal temporal2)

Overrides org.assertj.core.data.TemporalUnitOffset.getBeyondOffsetDifferenceDescription.

Implements org.assertj.core.data.TemporalOffset.getBeyondOffsetDifferenceDescription.

Doc from org.assertj.core.data.TemporalUnitOffset.getBeyondOffsetDifferenceDescription.

Returns description of the difference between temporal values and expected offset details. Is designed for the case when difference is beyond offset.

Parameters
temporal1:Temporal

Doc from org.assertj.core.data.TemporalOffset.getBeyondOffsetDifferenceDescription.

first temporal value which is being validated against second temporal value.

temporal2:Temporal

Doc from org.assertj.core.data.TemporalOffset.getBeyondOffsetDifferenceDescription.

second temporal value.

Returns:String

Doc from org.assertj.core.data.TemporalOffset.getBeyondOffsetDifferenceDescription.

difference description.

Annotations
@Override
isBeyondOffsetback to summary
public boolean isBeyondOffset(Temporal temporal1, Temporal temporal2)

Implements org.assertj.core.data.TemporalOffset.isBeyondOffset.

Checks if difference between temporal values is less then or equal to offset.

Parameters
temporal1:Temporal

first temporal value to be validated against second temporal value.

temporal2:Temporal

second temporal value.

Returns:boolean

true if difference between temporal values is more than offset value.

Annotations
@Override