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