public class LimitedFiniteStringsIterator extends FiniteStringsIterator
FiniteStringsIterator
which limits the number of iterated accepted strings.
If more than limit
strings are accepted,
the first limit
strings found are returned.
If the Automaton
has cycles then this iterator may throw an IllegalArgumentException
, but this is not guaranteed!
Be aware that the iteration order is implementation dependent and may change across releases.
Constructor and Description |
---|
LimitedFiniteStringsIterator(Automaton a,
int limit)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
IntsRef |
next()
Generate next finite string.
|
int |
size()
Number of iterated finite strings.
|
public LimitedFiniteStringsIterator(Automaton a, int limit)
a
- Automaton to create finite string from.limit
- Maximum number of finite strings to create, or -1 for infinite.public IntsRef next()
FiniteStringsIterator
next
in class FiniteStringsIterator
public int size()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.