GXPARSE hosted by SourceForge.net Logo

ca.gorman.util.scan
Interface MatchedText

All Superinterfaces:
CharSequence
All Known Implementing Classes:
AbstractMatchedText

public interface MatchedText
extends CharSequence

A sequence of characters that have been matched in a ScanBuffer.

A MatchedText instance becomes invalid when a prefix of nonzero length is removed from the corresponding ScanBuffer or one of its ancestor ScanBuffers. If a non-volatile character sequence is required, it should be obtained via the toString method.

Some implementations of MatchedText may hold much more data than will fit in memory. In such cases, copying very large numbers of characters to memory or invoking the toString() on the MatchedText (or on a large subsequence of the MatchedText) may cause an OutOfMemoryError.

The content of a MatchedText, and any of its subsquences, is undefined outside the scope of an instance method in ScanMatch, ScanAction, or ScanRule. When persistent data is required, the data should be obtained by copying the characters or by invoking the toString method of the appropriate MatchedText or subsequence.


Method Summary
 
Methods inherited from interface java.lang.CharSequence
charAt, length, subSequence, toString
 


GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License