SELF - the "self" type of this assertion class.ELEMENT - the type of elements.public class AbstractSpliteratorAssert<SELF extends AbstractSpliteratorAssert<SELF,ELEMENT>,ELEMENT> extends AbstractAssert<SELF,Spliterator<ELEMENT>>
Spliterator type.actual, info, myself, objects, throwUnsupportedExceptionOnEquals| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSpliteratorAssert(Spliterator<ELEMENT> actual,
Class<?> selfType) |
| Modifier and Type | Method and Description |
|---|---|
SELF |
hasCharacteristics(int... characteristics)
Asserts the actual
has the given characteristics. |
SELF |
hasOnlyCharacteristics(int... characteristics)
Asserts the actual
has only the given characteristics and nothing else. |
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, 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, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitas, as, as, describedAsprotected AbstractSpliteratorAssert(Spliterator<ELEMENT> actual, Class<?> selfType)
public SELF hasCharacteristics(int... characteristics)
Spliterator has the given characteristics.
Example:
Spliterator<Integer> spliterator = Stream.of(1, 2, 3).spliterator();
// this assertion succeeds:
assertThat(spliterator).hasCharacteristics(Spliterator.SIZED, Spliterator.ORDERED);
// this assertion fails as the Spliterator does not have characteristic DISTINCT:
assertThat(spliterator).hasCharacteristics(Spliterator.DISTINCT); characteristics - the expected characteristics.this assertion object.AssertionError - if the actual Spliterator is null.AssertionError - if the actual Spliterator does not have the expected characteristics.public SELF hasOnlyCharacteristics(int... characteristics)
Spliterator has only the given characteristics and nothing else.
Example:
Spliterator<Integer> spliterator = Stream.of(1, 2, 3).spliterator();
// this assertion succeeds:
assertThat(spliterator).hasOnlyCharacteristics(Spliterator.SIZED,
Spliterator.SUBSIZED,
Spliterator.IMMUTABLE,
Spliterator.ORDERED);
// this assertion fails as the Spliterator has additional characteristics IMMUTABLE and ORDERED:
assertThat(spliterator).hasOnlyCharacteristics(Spliterator.SIZED, Spliterator.SUBSIZED); characteristics - the expected characteristics.this assertion object.AssertionError - if the actual Spliterator is null.AssertionError - if the actual Spliterator does not have the expected characteristics
or the actual Spliterator has additional characteristics.Copyright © 2025. All rights reserved.