Class OffsetDateTimeFunction
- java.lang.Object
-
- org.exparity.hamcrest.date.core.function.OffsetDateTimeFunction
-
- All Implemented Interfaces:
TemporalFunction<OffsetDateTime>
public class OffsetDateTimeFunction extends Object implements TemporalFunction<OffsetDateTime>
Implementation ofTemporalFunctionsforOffsetDateTimeobjects.- Author:
- Stewart Bissett
-
-
Constructor Summary
Constructors Constructor Description OffsetDateTimeFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdescribe(OffsetDateTime temporal, Locale locale)Describe a temporal typeIntervalinterval(OffsetDateTime expected, OffsetDateTime other, ChronoUnit unit)Return the interval between two temporalsbooleanisAfter(OffsetDateTime expected, OffsetDateTime actual)Test if a temporal is after another temporalbooleanisBefore(OffsetDateTime expected, OffsetDateTime actual)Test if a temporal is before another temporalbooleanisSame(OffsetDateTime expected, OffsetDateTime actual)Test if a temporal is the same as another temporal
-
-
-
Method Detail
-
isAfter
public boolean isAfter(OffsetDateTime expected, OffsetDateTime actual)
Description copied from interface:TemporalFunctionTest if a temporal is after another temporal- Specified by:
isAfterin interfaceTemporalFunction<OffsetDateTime>- Parameters:
expected- the temporal to test foractual- the temporal to test against- Returns:
- a boolean
-
isBefore
public boolean isBefore(OffsetDateTime expected, OffsetDateTime actual)
Description copied from interface:TemporalFunctionTest if a temporal is before another temporal- Specified by:
isBeforein interfaceTemporalFunction<OffsetDateTime>- Parameters:
expected- the temporal to test foractual- the temporal to test against- Returns:
- a boolean
-
isSame
public boolean isSame(OffsetDateTime expected, OffsetDateTime actual)
Description copied from interface:TemporalFunctionTest if a temporal is the same as another temporal- Specified by:
isSamein interfaceTemporalFunction<OffsetDateTime>- Parameters:
expected- the temporal to test foractual- the temporal to test against- Returns:
- a boolean
-
interval
public Interval interval(OffsetDateTime expected, OffsetDateTime other, ChronoUnit unit)
Description copied from interface:TemporalFunctionReturn the interval between two temporals- Specified by:
intervalin interfaceTemporalFunction<OffsetDateTime>- Parameters:
expected- the temporal to test forother- the temporal to test againstunit- the unit to measure the interval in- Returns:
- an
Interval
-
describe
public String describe(OffsetDateTime temporal, Locale locale)
Description copied from interface:TemporalFunctionDescribe a temporal type- Specified by:
describein interfaceTemporalFunction<OffsetDateTime>- Parameters:
temporal- the temporal instance to describelocale- the locale to describe the temporal in- Returns:
- a string description of the temporal
-
-