/** {@inheritDoc} */ public S hasSameSizeAs(Object other) { maps.assertHasSameSizeAs(info, actual, other); return myself; }
/** {@inheritDoc} */ @Override public S hasSameSizeAs(Iterable<?> other) { maps.assertHasSameSizeAs(info, actual, other); return myself; }
/** * Verifies that the actual map has the same size as the given {@link Map}. * * <p>Example : * * <pre><code class='java'> * Map<Ring, TolkienCharacter> ringBearers = ... // init with elves rings and the one ring * * assertThat(ringBearers).hasSameSizeAs(mapOf(entry(oneRing, frodo), * entry(narya, gandalf), * entry(nenya, galadriel), * entry(vilya, elrond))); * </code></pre> * * @param other the {@code Map} to compare size with actual map * @return {@code this} assertion object * @throws NullPointerException if the other {@code Map} is {@code null} * @throws AssertionError if the actual map is {@code null} * @throws AssertionError if the actual map and the given {@code Map} don't have the same size */ public S hasSameSizeAs(Map<?, ?> other) { maps.assertHasSameSizeAs(info, actual, other); return myself; }