public Spliterator<E> spliterator() {
        return Spliterators.spliterator
            (this, (Spliterator.ORDERED |
                    Spliterator.NONNULL |
                    Spliterator.CONCURRENT));
    }
public Spliterator < E > spliterator ( ) { return Spliterators . spliterator ( this , ( Spliterator . ORDERED | Spliterator . NONNULL | Spliterator . CONCURRENT ) ) ; }
Returns a {@link Spliterator} over the elements in this queue.

<p>The returned spliterator is
<a href="package-summary.html#Weakly"><i>weakly consistent</i></a>.

<p>The {@code Spliterator} reports {@link Spliterator#CONCURRENT},
{@link Spliterator#ORDERED}, and {@link Spliterator#NONNULL}.

@implNote
The {@code Spliterator} implements {@code trySplit} to permit limited
parallelism.

@return a {@code Spliterator} over the elements in this queue
@since 1.8