All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----gnu.regexp.REMatchEnumeration
getMatchEnumeration()
methods on an instance of RE.
REMatchEnumeration does lazy computation; that is, it will not search for
a match until it needs to. If you'd rather just get all the matches at
once in a big array, use the getAllMatches()
methods on RE.
However, using an enumeration can help speed performance when the entire
text does not need to be searched immediately.
The enumerated type is especially useful when searching on an InputStream,
because the InputStream read position cannot be guaranteed after calling
getMatch()
(see the description of that method for an
explanation of why). Enumeration also saves a lot of overhead required
when calling getMatch()
multiple times.
public boolean hasMoreElements()
public boolean hasMoreMatches()
public Object nextElement() throws NoSuchElementException
public REMatch nextMatch() throws NoSuchElementException
All Packages Class Hierarchy This Package Previous Next Index