Package net.sf.saxon.regex

## Class JTokenIterator

- java.lang.Object
- - net.sf.saxon.regex.JTokenIterator

- All Implemented Interfaces:
    `java.io.Closeable`, `java.lang.AutoCloseable`, `SequenceIterator`, `AtomicIterator<StringValue>`, `UnfailingIterator`

      public class JTokenIterator
      extends java.lang.Object
      implements AtomicIterator<StringValue>

  A JTokenIterator is an iterator over the strings that result from tokenizing a string using a regular expression, in this case a regular expression evaluated using the JDK regex engine

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface net.sf.saxon.om.SequenceIterator

      `SequenceIterator.Property`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JTokenIterator​(java.lang.CharSequence input, java.util.regex.Pattern pattern)` | Construct a JTokenIterator.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `StringValue` | `next()` | Get the next atomic value in the sequence.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.om.SequenceIterator

      `close, forEachOrFail, getProperties, materialize`

    - ### Methods inherited from interface net.sf.saxon.tree.iter.UnfailingIterator

      `forEach, toList`

- - ### Constructor Detail

    - #### JTokenIterator

          public JTokenIterator​(java.lang.CharSequence input,
                                java.util.regex.Pattern pattern)

      Construct a JTokenIterator.

  - ### Method Detail

    - #### next

          public StringValue next()

      Description copied from interface: `AtomicIterator`
      Get the next atomic value in the sequence.
      Specified by:
        `next` in interface `AtomicIterator<StringValue>`
      Specified by:
        `next` in interface `SequenceIterator`
      Specified by:
        `next` in interface `UnfailingIterator`
      Returns:
        the next Item. If there are no more items, return null.