Class AbstractYearMonthAssert<SELF extends AbstractYearMonthAssert<SELF>>
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<SELF,TEMPORAL>
-
- org.assertj.core.api.AbstractTemporalAssert<SELF,java.time.YearMonth>
-
- org.assertj.core.api.AbstractYearMonthAssert<SELF>
-
- Type Parameters:
SELF- the "self" type of this assertion class.
- All Implemented Interfaces:
Assert<SELF,java.time.YearMonth>,Descriptable<SELF>,ExtensionPoints<SELF,java.time.YearMonth>
- Direct Known Subclasses:
YearMonthAssert
public abstract class AbstractYearMonthAssert<SELF extends AbstractYearMonthAssert<SELF>> extends AbstractTemporalAssert<SELF,java.time.YearMonth>
Base class for all implementations of assertions forYearMonthtype from new Date & Time API introduced in Java 8.- Since:
- 3.26.0
-
-
Field Summary
-
Fields inherited from class org.assertj.core.api.AbstractTemporalAssert
comparables
-
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, assertionErrorCreator, conditions, customRepresentation, info, myself, objects, printAssertionsDescription, throwUnsupportedExceptionOnEquals
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractYearMonthAssert(java.time.YearMonth actual, java.lang.Class<?> selfType)Creates a new.AbstractYearMonthAssert
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidassertYearMonthAsStringParameterIsNotNull(java.lang.String otherYearMonthAsString)Check that theYearMonthstring representation to compare actualYearMonthto is not null, otherwise throws aIllegalArgumentExceptionwith an explicit message.private static voidassertYearMonthParameterIsNotNull(java.time.YearMonth other)Check that theYearMonthto compare actualYearMonthto is not null, in that case throws aIllegalArgumentExceptionwith an explicit message.private static voidcheckIsNotNullAndNotEmpty(java.lang.Object[] values)private static java.lang.Object[]convertToYearMonthArray(java.lang.String... yearMonthsAsString)SELFhasMonth(java.time.Month month)Verifies that the actualYearMonthis in the given month.SELFhasMonthValue(int month)Verifies that the actualYearMonthis in the given month.SELFhasYear(int year)Verifies that the actualYearMonthis in the given year.SELFisAfter(java.lang.String otherYearMonthAsString)Verifies that the actualYearMonthis strictly after the given one.SELFisAfter(java.time.YearMonth other)Verifies that the actualYearMonthis strictly after the given one.SELFisAfterOrEqualTo(java.lang.String otherYearMonthAsString)Verifies that the actualYearMonthis after or equal to the given one.SELFisAfterOrEqualTo(java.time.YearMonth other)Verifies that the actualYearMonthis after or equal to the given one.SELFisBefore(java.lang.String otherYearMonthAsString)Verifies that the actualYearMonthis strictly before the given one.SELFisBefore(java.time.YearMonth other)Verifies that the actualYearMonthis strictly before the given one.SELFisBeforeOrEqualTo(java.lang.String otherYearMonthAsString)Verifies that the actualYearMonthis before or equal to the given one.SELFisBeforeOrEqualTo(java.time.YearMonth other)Verifies that the actualYearMonthis before or equal to the given one.SELFisBetween(java.lang.String startInclusive, java.lang.String endInclusive)Verifies that the actualYearMonthis in the [start, end] period (start and end included).SELFisBetween(java.time.YearMonth startInclusive, java.time.YearMonth endInclusive)Verifies that the actualYearMonthis in the [start, end] period (start and end included).SELFisCurrentYearMonth()Verifies that the actualYearMonthis the currentYearMonth.SELFisEqualTo(java.lang.String otherYearMonthAsString)Verifies that the actualYearMonthis equal to the given one.SELFisIn(java.lang.String... otherYearMonthsAsString)Verifies that the actualYearMonthis present in the given array of values.SELFisInTheFuture()Verifies that the actualYearMonthis strictly in the future.SELFisInThePast()Verifies that the actualYearMonthis strictly in the past.SELFisNotEqualTo(java.lang.String otherYearMonthAsString)Verifies that the actualYearMonthis not equal to the given one.SELFisNotIn(java.lang.String... otherYearMonthsAsString)Verifies that the actualYearMonthis not present in the given array of values.SELFisStrictlyBetween(java.lang.String startExclusive, java.lang.String endExclusive)Verifies that the actualYearMonthis in the ]start, end[ period (start and end excluded).SELFisStrictlyBetween(java.time.YearMonth startExclusive, java.time.YearMonth endExclusive)Verifies that the actualYearMonthis in the ]start, end[ period (start and end excluded).protected java.time.YearMonthparse(java.lang.String yearMonthAsString)Obtains an instance ofYearMonthfrom a text string such as 2007-12.-
Methods inherited from class org.assertj.core.api.AbstractTemporalAssert
isCloseTo, isCloseTo, usingComparator, usingComparator, usingDefaultComparator
-
Methods inherited from class org.assertj.core.api.AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withAssertionState, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
-
-
-
Constructor Detail
-
AbstractYearMonthAssert
protected AbstractYearMonthAssert(java.time.YearMonth actual, java.lang.Class<?> selfType)Creates a new.AbstractYearMonthAssert- Parameters:
selfType- the "self-type".actual- the actual value to verify.
-
-
Method Detail
-
isBefore
public SELF isBefore(java.time.YearMonth other)
Verifies that the actualYearMonthis strictly before the given one.Example:
assertThat(YearMonth.of(2000, 1)).isBefore(YearMonth.of(2000, 2));- Parameters:
other- the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if otherYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not strictly before the given one.
-
isBefore
public SELF isBefore(java.lang.String otherYearMonthAsString)
Verifies that the actualYearMonthis strictly before the given one.Same assertion as
isBefore(YearMonth)but theYearMonthis built from the given string, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
// use string representation of YearMonth assertThat(YearMonth.of(2000, 1)).isBefore("2000-02");- Parameters:
otherYearMonthAsString- string representation of the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if the given string isnull.java.time.format.DateTimeParseException- if the given string cannot be parsed to aYearMonth.java.lang.AssertionError- if the actualYearMonthis not strictly before theYearMonthbuilt from given string.
-
isBeforeOrEqualTo
public SELF isBeforeOrEqualTo(java.time.YearMonth other)
Verifies that the actualYearMonthis before or equal to the given one.Example:
assertThat(YearMonth.of(2000, 1)).isBeforeOrEqualTo(YearMonth.of(2000, 1)) .isBeforeOrEqualTo(YearMonth.of(2000, 2));- Parameters:
other- the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if otherYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not before or equal to the given one.
-
isBeforeOrEqualTo
public SELF isBeforeOrEqualTo(java.lang.String otherYearMonthAsString)
Verifies that the actualYearMonthis before or equal to the given one.Same assertion as
isBeforeOrEqualTo(YearMonth)but theYearMonthis built from given string, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
// use string representation of YearMonth assertThat(YearMonth.of(2000, 1)).isBeforeOrEqualTo("2000-01") .isBeforeOrEqualTo("2000-02");- Parameters:
otherYearMonthAsString- string representation of the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if the given string isnull.java.time.format.DateTimeParseException- if the given string cannot be parsed to aYearMonth.java.lang.AssertionError- if the actualYearMonthis not before or equal to theYearMonthbuilt from given string.
-
isAfterOrEqualTo
public SELF isAfterOrEqualTo(java.time.YearMonth other)
Verifies that the actualYearMonthis after or equal to the given one.Example:
assertThat(YearMonth.of(2000, 1)).isAfterOrEqualTo(YearMonth.of(2000, 1)) .isAfterOrEqualTo(parse("1999-12"));- Parameters:
other- the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if otherYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not after or equal to the given one.
-
isAfterOrEqualTo
public SELF isAfterOrEqualTo(java.lang.String otherYearMonthAsString)
Verifies that the actualYearMonthis after or equal to the given one.Same assertion as
isAfterOrEqualTo(YearMonth)but theYearMonthis built from given string, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
// use string representation of YearMonth assertThat(YearMonth.of(2000, 1)).isAfterOrEqualTo("2000-01") .isAfterOrEqualTo("1999-12");- Parameters:
otherYearMonthAsString- string representation of the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if the given string isnull.java.time.format.DateTimeParseException- if the given string cannot be parsed to aYearMonth.java.lang.AssertionError- if the actualYearMonthis not after or equal to theYearMonthbuilt from given string.
-
isAfter
public SELF isAfter(java.time.YearMonth other)
Verifies that the actualYearMonthis strictly after the given one.Example:
assertThat(YearMonth.of(2000, 1)).isAfter(parse("1999-12"));- Parameters:
other- the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if otherYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not strictly after the given one.
-
isAfter
public SELF isAfter(java.lang.String otherYearMonthAsString)
Verifies that the actualYearMonthis strictly after the given one.Same assertion as
isAfter(YearMonth)but theYearMonthis built from given string, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
// use string representation of YearMonth assertThat(YearMonth.of(2000, 1)).isAfter("1999-12");- Parameters:
otherYearMonthAsString- string representation of the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if the given string isnull.java.time.format.DateTimeParseException- if the given string cannot be parsed to aYearMonth.java.lang.AssertionError- if the actualYearMonthis not strictly after theYearMonthbuilt from given string.
-
isEqualTo
public SELF isEqualTo(java.lang.String otherYearMonthAsString)
Verifies that the actualYearMonthis equal to the given one.Same assertion as
AbstractAssert.isEqualTo(Object)but theYearMonthis built from given string, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
// use string representation of YearMonth assertThat(YearMonth.of(2000, 1)).isEqualTo("2000-01");- Parameters:
otherYearMonthAsString- string representation of the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if the given string isnull.java.time.format.DateTimeParseException- if the given string cannot be parsed to aYearMonth.java.lang.AssertionError- if the actualYearMonthis not equal to theYearMonthbuilt from given string.
-
isNotEqualTo
public SELF isNotEqualTo(java.lang.String otherYearMonthAsString)
Verifies that the actualYearMonthis not equal to the given one.Same assertion as
AbstractAssert.isNotEqualTo(Object)but theYearMonthis built from given string, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
// use string representation of YearMonth assertThat(YearMonth.of(2000, 1)).isNotEqualTo("2000-02");- Parameters:
otherYearMonthAsString- string representation of the otherYearMonthto compare to, not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if the given string isnull.java.time.format.DateTimeParseException- if the given string cannot be parsed to aYearMonth.java.lang.AssertionError- if the actualYearMonthis equal to theYearMonthbuilt from given string.
-
isIn
public SELF isIn(java.lang.String... otherYearMonthsAsString)
Verifies that the actualYearMonthis present in the given array of values.Same assertion as
AbstractAssert.isIn(Object...)but theYearMonths are built from given strings, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
// use string representation of YearMonth assertThat(YearMonth.of(2000, 1)).isIn("1999-12", "2000-01");- Parameters:
otherYearMonthsAsString- string array representingYearMonths.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if any of the given strings isnull.java.time.format.DateTimeParseException- if any of the given strings cannot be parsed to aYearMonth.java.lang.AssertionError- if the actualYearMonthis not in theYearMonths built from given strings.
-
isNotIn
public SELF isNotIn(java.lang.String... otherYearMonthsAsString)
Verifies that the actualYearMonthis not present in the given array of values.Same assertion as
AbstractAssert.isNotIn(Object...)but theYearMonths are built from given strings, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
// use string representation of YearMonth assertThat(YearMonth.of(2000, 1)).isNotIn("1999-12", "2000-02");- Parameters:
otherYearMonthsAsString- Array of string representing aYearMonth.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.IllegalArgumentException- if any of the given strings isnull.java.time.format.DateTimeParseException- if any of the given strings cannot be parsed to aYearMonth.java.lang.AssertionError- if the actualYearMonthis in theYearMonths built from given strings.
-
isInThePast
public SELF isInThePast()
Verifies that the actualYearMonthis strictly in the past.Example:
// assertion succeeds: assertThat(YearMonth.now().minusMonths(1)).isInThePast();- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not in the past.
-
isCurrentYearMonth
public SELF isCurrentYearMonth()
Verifies that the actualYearMonthis the currentYearMonth.Example:
// assertion succeeds: assertThat(YearMonth.now()).isCurrentYearMonth(); // assertion fails: assertThat(theFellowshipOfTheRing.getReleaseDate()).isCurrentYearMonth();- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not the currentYearMonth.
-
isInTheFuture
public SELF isInTheFuture()
Verifies that the actualYearMonthis strictly in the future.Example:
// assertion succeeds: assertThat(YearMonth.now().plusMonths(1)).isInTheFuture();- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not in the future.
-
isBetween
public SELF isBetween(java.time.YearMonth startInclusive, java.time.YearMonth endInclusive)
Verifies that the actualYearMonthis in the [start, end] period (start and end included).Example:
YearMonth yearMonth = YearMonth.now(); // assertions succeed: assertThat(yearMonth).isBetween(yearMonth.minusMonths(1), yearMonth.plusMonths(1)) .isBetween(yearMonth, yearMonth.plusMonths(1)) .isBetween(yearMonth.minusMonths(1), yearMonth) .isBetween(yearMonth, yearMonth); // assertions fail: assertThat(yearMonth).isBetween(yearMonth.minusMonths(10), yearMonth.minusMonths(1)); assertThat(yearMonth).isBetween(yearMonth.plusMonths(1), yearMonth.plusMonths(10));- Parameters:
startInclusive- the start value (inclusive), not null.endInclusive- the end value (inclusive), not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actual value isnull.java.lang.NullPointerException- if start value isnull.java.lang.NullPointerException- if end value isnull.java.lang.AssertionError- if the actual value is not in [start, end] period.
-
isBetween
public SELF isBetween(java.lang.String startInclusive, java.lang.String endInclusive)
Verifies that the actualYearMonthis in the [start, end] period (start and end included).Same assertion as
isBetween(YearMonth, YearMonth)but theYearMonths are built from given strings, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
YearMonth january2000 = YearMonth.parse("2000-01"); // assertions succeed: assertThat(january2000).isBetween("1999-01", "2001-01") .isBetween("2000-01", "2001-01") .isBetween("1999-01", "2000-01") .isBetween("2000-01", "2000-01"); // assertion fails: assertThat(january2000).isBetween("1999-01", "1999-12");- Parameters:
startInclusive- the start value (inclusive), not null.endInclusive- the end value (inclusive), not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actual value isnull.java.lang.NullPointerException- if start value isnull.java.lang.NullPointerException- if end value isnull.java.time.format.DateTimeParseException- if any of the given string can't be converted to aYearMonth.java.lang.AssertionError- if the actual value is not in [start, end] period.
-
isStrictlyBetween
public SELF isStrictlyBetween(java.time.YearMonth startExclusive, java.time.YearMonth endExclusive)
Verifies that the actualYearMonthis in the ]start, end[ period (start and end excluded).Example:
YearMonth yearMonth = YearMonth.now(); // assertion succeeds: assertThat(yearMonth).isStrictlyBetween(yearMonth.minusMonths(1), yearMonth.plusMonths(1)); // assertions fail: assertThat(yearMonth).isStrictlyBetween(yearMonth.minusMonths(10), yearMonth.minusMonths(1)); assertThat(yearMonth).isStrictlyBetween(yearMonth.plusMonths(1), yearMonth.plusMonths(10)); assertThat(yearMonth).isStrictlyBetween(yearMonth, yearMonth.plusMonths(1)); assertThat(yearMonth).isStrictlyBetween(yearMonth.minusMonths(1), yearMonth);- Parameters:
startExclusive- the start value (exclusive), not null.endExclusive- the end value (exclusive), not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actual value isnull.java.lang.NullPointerException- if start value isnull.java.lang.NullPointerException- if end value isnull.java.lang.AssertionError- if the actual value is not in ]start, end[ period.
-
isStrictlyBetween
public SELF isStrictlyBetween(java.lang.String startExclusive, java.lang.String endExclusive)
Verifies that the actualYearMonthis in the ]start, end[ period (start and end excluded).Same assertion as
isStrictlyBetween(YearMonth, YearMonth)but theYearMonths are built from given strings, which must follow theDateTimeFormatterpatternuuuu-MMto allow callingYearMonth.parse(CharSequence)method.Example:
YearMonth january2000 = YearMonth.parse("2000-01"); // assertion succeeds: assertThat(january2000).isStrictlyBetween("1999-01", "2001-01"); // assertions fail: assertThat(january2000).isStrictlyBetween("1999-01", "1999-12"); assertThat(january2000).isStrictlyBetween("2000-01", "2001-01"); assertThat(january2000).isStrictlyBetween("1999-01", "2000-01");- Parameters:
startExclusive- the start value (exclusive), not null.endExclusive- the end value (exclusive), not null.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actual value isnull.java.lang.NullPointerException- if start value isnull.java.lang.NullPointerException- if end value isnull.java.time.format.DateTimeParseException- if any of the given string can't be converted to aYearMonth.java.lang.AssertionError- if the actual value is not in ]start, end[ period.
-
hasYear
public SELF hasYear(int year)
Verifies that the actualYearMonthis in the given year.Example:
// assertion succeeds: assertThat(YearMonth.of(2000, 12)).hasYear(2000); // assertion fails: assertThat(YearMonth.of(2000, 12)).hasYear(2001);- Parameters:
year- the given year.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not in the given year.
-
hasMonth
public SELF hasMonth(java.time.Month month)
Verifies that the actualYearMonthis in the given month.Example:
// assertion succeeds: assertThat(YearMonth.of(2000, 12)).hasMonth(Month.DECEMBER); // assertion fails: assertThat(YearMonth.of(2000, 12)).hasMonth(Month.JANUARY);- Parameters:
month- the givenMonth.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not in the given month.
-
hasMonthValue
public SELF hasMonthValue(int month)
Verifies that the actualYearMonthis in the given month.Example:
// assertion succeeds: assertThat(YearMonth.of(2000, 12)).hasMonthValue(12); // assertion fails: assertThat(YearMonth.of(2000, 12)).hasMonthValue(11);- Parameters:
month- the given month's value between 1 and 12 inclusive.- Returns:
thisassertion object.- Throws:
java.lang.AssertionError- if the actualYearMonthisnull.java.lang.AssertionError- if the actualYearMonthis not in the given month.
-
parse
protected java.time.YearMonth parse(java.lang.String yearMonthAsString)
Obtains an instance ofYearMonthfrom a text string such as 2007-12.- Specified by:
parsein classAbstractTemporalAssert<SELF extends AbstractYearMonthAssert<SELF>,java.time.YearMonth>- Parameters:
yearMonthAsString- the string to parse, not null- Returns:
- the parsed
TEMPORAL, not null - See Also:
YearMonth.parse(CharSequence)
-
assertYearMonthParameterIsNotNull
private static void assertYearMonthParameterIsNotNull(java.time.YearMonth other)
Check that theYearMonthto compare actualYearMonthto is not null, in that case throws aIllegalArgumentExceptionwith an explicit message.- Parameters:
other- theYearMonthto check.- Throws:
java.lang.IllegalArgumentException- with an explicit message if the givenYearMonthis null.
-
assertYearMonthAsStringParameterIsNotNull
private static void assertYearMonthAsStringParameterIsNotNull(java.lang.String otherYearMonthAsString)
Check that theYearMonthstring representation to compare actualYearMonthto is not null, otherwise throws aIllegalArgumentExceptionwith an explicit message.- Parameters:
otherYearMonthAsString- string representing theYearMonthto compare actual with.- Throws:
java.lang.IllegalArgumentException- with an explicit message if the givenStringis null.
-
checkIsNotNullAndNotEmpty
private static void checkIsNotNullAndNotEmpty(java.lang.Object[] values)
-
convertToYearMonthArray
private static java.lang.Object[] convertToYearMonthArray(java.lang.String... yearMonthsAsString)
-
-