Interface SpliteratorContract<E,I extends Iterable<E>>

Type Parameters:
E - The element type being tested.
I - The type for the iterator being tested.
All Superinterfaces:
CollectionContractConfig, CollectionContractSupport<E,I>, CollectionProviderSupport<E,I>, ContractSupport<I>, ElementProviderSupport<E>, IteratorContract<E,I>, ProviderSupport<I>, SupportedMethods
All Known Subinterfaces:
CollectionContract<E,C>, IterableContract<E,I>, ListContract<E,L>, SequencedCollectionContract<E,C>

public interface SpliteratorContract<E,I extends Iterable<E>> extends IteratorContract<E,I>
This interface tests if a collection class has implemented the spliterator() method correctly and that the spliterator that is returned satisfies the Spliterator contract.
Since:
1.0.0
Author:
evanbergstrom
See Also:
  • Field Details

    • CHARACTERISTIC_VALUES

      static final int[] CHARACTERISTIC_VALUES
      The full list of supported Spliterator characteristics.
  • Method Details

    • testHasCharacteristic

      @Test @DisplayName("The hasCharacteristics method works") default void testHasCharacteristic()
      Tests that the Spliterator.hasCharacteristics(int) method works.
    • testSpliteratorGetExactSizeIfKnownOnAnEmptyCollection

      @Test @DisplayName("The getExactSizeIfKnown method can be called on an empty container") default void testSpliteratorGetExactSizeIfKnownOnAnEmptyCollection()
      Tests that the Spliterator.getExactSizeIfKnown() method works on an empty collection.
    • testSpliteratorGetExactSizeIfKnownOnACollectionWithElements

      @Test @DisplayName("The getExactSizeIfKnown method can be called on a container with elements") default void testSpliteratorGetExactSizeIfKnownOnACollectionWithElements()
      Tests that the Spliterator.getExactSizeIfKnown() method works on a collection with elements.
    • testSpliteratorEstimateSizeOnAnEmptyCollection

      @Test @DisplayName("The estimateSize method can be called on an empty container") default void testSpliteratorEstimateSizeOnAnEmptyCollection()
      Tests that the Spliterator.estimateSize() method works on an empty collection.
    • testSpliteratorEstimateSizeOnACollectionWithElements

      @Test @DisplayName("The Spliterator.estimateSize method can be called on a container with elements") default void testSpliteratorEstimateSizeOnACollectionWithElements()
      Tests that the Spliterator.estimateSize() method works on a collection with elements.
    • testSpliteratorForEachRemainingOnAnEmptyCollection

      @Test @DisplayName("The Spliterator.forEachRemaining method can be called on an empty container") default void testSpliteratorForEachRemainingOnAnEmptyCollection()
      Tests that the Spliterator.forEachRemaining(java.util.function.Consumer<? super T>) method works on an empty collection.
    • testSpliteratorForEachRemainingOnACollectionWithElements

      @Test @DisplayName("The Spliterator.forEachRemaining method can be called on a container with elements") default void testSpliteratorForEachRemainingOnACollectionWithElements()
      Tests that the Spliterator.forEachRemaining(java.util.function.Consumer<? super T>) method works on a collection with elements.
    • testSpliteratorTryAdvanceOnAnEmptyCollection

      @Test @DisplayName("The Spliterator.tryAdvance method can be called on an empty container") default void testSpliteratorTryAdvanceOnAnEmptyCollection()
      Tests that the Spliterator.tryAdvance(java.util.function.Consumer<? super T>) method works on an empty collection.
    • testSpliteratorTryAdvanceOnACollectionWithElements

      @Test @DisplayName("The Spliterator.tryAdvance method can be called on a container with elements") default void testSpliteratorTryAdvanceOnACollectionWithElements()
      Tests that the Spliterator.tryAdvance(java.util.function.Consumer<? super T>) method works on a collection with elements.
    • testSpliteratorTrySplitOnAnEmptyCollection

      @Test @DisplayName("The Spliterator.trySplit method can be called on an empty container") default void testSpliteratorTrySplitOnAnEmptyCollection()
      Tests that the Spliterator.trySplit() method works on an empty collection.
    • testSpliteratorTrySplitOnACollectionWithElements

      @Test @DisplayName("The Spliterator.trySplit method can be called on a container with elements") default void testSpliteratorTrySplitOnACollectionWithElements()
      Tests that the Spliterator.trySplit() method works on a collection with elements.