Package org.exparity.hamcrest.date.core
Class TemporalMatcher<T>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeDiagnosingMatcher<T>
-
- org.exparity.hamcrest.date.core.TemporalMatcher<T>
-
- Type Parameters:
T- the type of objects handled by this matcher
- All Implemented Interfaces:
org.hamcrest.Matcher<T>,org.hamcrest.SelfDescribing
- Direct Known Subclasses:
IsAfter,IsBefore,IsDayOfMonth,IsDayOfWeek,IsFirstDayOfMonth,IsHour,IsLastDayOfMonth,IsLeapYear,IsMaximum,IsMillisecond,IsMinimum,IsMinute,IsMonth,IsSame,IsSameDay,IsSameOrAfter,IsSameOrBefore,IsSecond,IsWithin,IsYear
public abstract class TemporalMatcher<T> extends org.hamcrest.TypeSafeDiagnosingMatcher<T>AbstractMatcherfor temporal objects allowing for time zone manipulation.- Author:
- Thomas Naskali
-
-
Constructor Summary
Constructors Constructor Description TemporalMatcher()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TemporalMatcher<T>atLocale(Locale locale)Creates a copy of this matcher using a specific locale.TemporalMatcher<T>atOffset(ZoneOffset offset)Creates a copy of this matcher using a specific time offset.abstract TemporalMatcher<T>atZone(ZoneId zone)Creates a copy of this matcher using a specific time zone.-
Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher
describeMismatch, matches, matchesSafely
-
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
-
-
-
-
Method Detail
-
atZone
public abstract TemporalMatcher<T> atZone(ZoneId zone)
Creates a copy of this matcher using a specific time zone.- Parameters:
zone- aZoneId- Returns:
- a copy of this matcher based on the new time zone
-
atLocale
public abstract TemporalMatcher<T> atLocale(Locale locale)
Creates a copy of this matcher using a specific locale.- Parameters:
locale- aLocale- Returns:
- a copy of this matcher using the new locale
-
atOffset
public TemporalMatcher<T> atOffset(ZoneOffset offset)
Creates a copy of this matcher using a specific time offset.- Parameters:
offset- the new time offset- Returns:
- a copy of this matcher based on the new time offset
-
-