public class StreamPatternMatches extends Object implements Closeable
Constructor and Description |
---|
StreamPatternMatches(Reader input,
Collection<Pattern> patterns,
boolean discard)
Constructs a new stream pattern match iterator.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this character stream, as well as the the reader it its iterating over.
|
boolean |
hasNext()
Returns
true if the character stream has more matches. |
Matcher |
next()
Returns the next match from the character stream.
|
public StreamPatternMatches(Reader input, Collection<Pattern> patterns, boolean discard)
discard
is true
,
then a pattern is discarded after it is first matched.input
- the character stream to match regular expression patterns against.patterns
- a collection of regular expression patterns to match.discard
- indicates patterns be discarded after they yield a match.public Matcher next() throws IOException
Matcher
from the character stream.IOException
- if an I/O exception occurs.NoSuchElementException
- if the reader has no more matches.public boolean hasNext() throws IOException
true
if the character stream has more matches.true
if the character stream has more matches.IOException
- if an I/O exception occurs.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
- if an I/O exception occurs.Copyright © 2025 Open Identity Platform Community. All rights reserved.