Package org.exparity.hamcrest.date.core
Class IsHour<T>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeDiagnosingMatcher<T>
-
- org.exparity.hamcrest.date.core.TemporalMatcher<T>
-
- org.exparity.hamcrest.date.core.IsHour<T>
-
- All Implemented Interfaces:
org.hamcrest.Matcher<T>,org.hamcrest.SelfDescribing
public class IsHour<T> extends TemporalMatcher<T>
A matcher that tests that the examined date is on the specified hour- Author:
- Stewart Bissett
-
-
Constructor Summary
Constructors Constructor Description IsHour(TemporalConverter<T,Hour> converter, TemporalProvider<Hour> expected)IsHour(TemporalConverter<T,Hour> converter, TemporalProvider<Hour> expected, Optional<ZoneId> zone, Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemporalMatcher<T>atLocale(Locale locale)Creates a copy of this matcher using a specific locale.TemporalMatcher<T>atZone(ZoneId zone)Creates a copy of this matcher using a specific time zone.voiddescribeTo(org.hamcrest.Description description)protected booleanmatchesSafely(T actual, org.hamcrest.Description mismatchDescription)-
Methods inherited from class org.exparity.hamcrest.date.core.TemporalMatcher
atOffset
-
-
-
-
Constructor Detail
-
IsHour
public IsHour(TemporalConverter<T,Hour> converter, TemporalProvider<Hour> expected, Optional<ZoneId> zone, Locale locale)
-
IsHour
public IsHour(TemporalConverter<T,Hour> converter, TemporalProvider<Hour> expected)
-
-
Method Detail
-
matchesSafely
protected boolean matchesSafely(T actual, org.hamcrest.Description mismatchDescription)
- Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeDiagnosingMatcher<T>
-
describeTo
public void describeTo(org.hamcrest.Description description)
-
atZone
public TemporalMatcher<T> atZone(ZoneId zone)
Description copied from class:TemporalMatcherCreates a copy of this matcher using a specific time zone.- Specified by:
atZonein classTemporalMatcher<T>- Parameters:
zone- aZoneId- Returns:
- a copy of this matcher based on the new time zone
-
atLocale
public TemporalMatcher<T> atLocale(Locale locale)
Description copied from class:TemporalMatcherCreates a copy of this matcher using a specific locale.- Specified by:
atLocalein classTemporalMatcher<T>- Parameters:
locale- aLocale- Returns:
- a copy of this matcher using the new locale
-
-