Temporals.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Comparables |
| Access | Constructor and Description |
|---|---|
| protected | AbstractTemporalAssert(TEMPORAL
the actual value to verify actual, Class<?> the "self type" selfType)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| protected TEMPORAL | |
| public SELF | Returns: this assertion objectthe temporal to compare actual to other, TemporalOffset<? super TEMPORAL> the offset used for comparison offset)Verifies that the actual |
| public SELF | Returns: this assertion object.String representing a otherAsString, TemporalOffset<? super TEMPORAL> TEMPORAL.the offset used for comparison offset)Same assertion as |
| protected abstract TEMPORAL | |
| public SELF | usingComparator(Comparator<? super TEMPORAL>
the comparator to use for the incoming assertion checks. customComparator)Overrides org. Implements org. |
| public SELF | usingComparator(Comparator<? super TEMPORAL>
the comparator to use for the incoming assertion checks. customComparator, String comparator description to be used in assertion error messages customComparatorDescription)Overrides org. Implements org. |
| public SELF | usingDefaultComparator()
Overrides org. Implements org. |
| comparables | back to summary |
|---|---|
| pack-priv Comparables comparables
| |
| AbstractTemporalAssert | back to summary |
|---|---|
| protected AbstractTemporalAssert(TEMPORAL actual, Class<?> selfType) Creates a new
| |
| getActual | back to summary |
|---|---|
protected TEMPORAL getActual()
| |
| isCloseTo | back to summary |
|---|---|
| public SELF isCloseTo(TEMPORAL other, TemporalOffset<? super TEMPORAL> offset) Verifies that the actual
You can build the offset parameter using Example:
| |
| isCloseTo | back to summary |
|---|---|
| public SELF isCloseTo(String otherAsString, TemporalOffset<? super TEMPORAL> offset) Same assertion as Example :
| |
| parse | back to summary |
|---|---|
| protected abstract TEMPORAL parse(String temporalAsString) Obtains an instance of
| |
| usingComparator | back to summary |
|---|---|
| public SELF usingComparator(Comparator<? super TEMPORAL> customComparator) Overrides org. Implements org. Doc from org. Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks. The custom comparator is bound to assertion instance, meaning that if a new assertion instance is created, the default comparison strategy will be used. Examples :
| |
| usingComparator | back to summary |
|---|---|
| public SELF usingComparator(Comparator<? super TEMPORAL> customComparator, String customComparatorDescription) Overrides org. Implements org. Doc from org. Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks. The custom comparator is bound to assertion instance, meaning that if a new assertion instance is created, the default comparison strategy will be used. Examples :
| |
| usingDefaultComparator | back to summary |
|---|---|
| public SELF usingDefaultComparator() Overrides org. Implements org. Doc from org. Revert to standard comparison for the incoming assertion checks.
This method should be used to disable a custom comparison strategy set by calling
| |