(sub)type of Chunk
being used.
The chunk currently being pointed at.
Initially, this should normally be the first chunk in the file.
Point currentChunk at the chunk following it, and return that chunk.
If there are no chunks following it, keep currentChunk
unchanged and
return null.
Test if a given chunk
is before the current chunk.
Returns true if chunk
is before this.currentChunk
, false otherwise
(i.e. if chunk
follows it or is the current chunk).
The given chunk
need not necessarily be obtained from the same Chunker
,
but the chunkers would need to represent the same file. Otherwise behaviour
is unspecified (an implementation might throw or just return false
).
A chunk, typically obtained from the same Chunker
.
Point currentChunk at the chunk preceding it, and return that chunk.
If there are no chunks preceding it, keep currentChunk
unchanged and
return null.
Presents the pieces of text contained in some underlying ‘file’ as a sequence of Chunks.
Rather than presenting a list of all pieces, the
Chunker
provides methods to walk through the file piece by piece. This permits implementations to read and convert the file toChunk
s lazily.For those familiar with the DOM APIs, it is similar to a NodeIterator (but unlike NodeIterator, it has no concept of being ‘before’ or ‘after’ a chunk).