Class MatchSpliterator

All Implemented Interfaces:
Spliterator<MatchResult>

public class MatchSpliterator extends Spliterators.AbstractSpliterator<MatchResult>
This is a Spliterator that lets you traverse MatchResults of a Matcher. Generally you should use one of the stream methods, but if you need a Spliterator instance you can use the constructor directly.

Gratefully included here in Kiwi courtesy of Philipp Wagner from his "A Spliterator for MatchResults in Java" blog entry. Slightly modified to check arguments and add an instance stream method.

Original blog post: A Spliterator for MatchResults in Java by Philipp Wagner.

  • Constructor Details

    • MatchSpliterator

      public MatchSpliterator(Matcher matcher)
      Create a new instance from the given Matcher. Usually you won't use this directly. Instead, use the stream methods.
      Parameters:
      matcher - the Matcher to split
  • Method Details