|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Chunking
The Chunking interface specifies a set of chunks
over a shared underlying character sequence. Each chunk in
the chunk set should provide a valid slice of that character
sequence.
A simple mutable implementation of the Chunking
interface is provided by the ChunkingImpl class.
| Method Summary | |
|---|---|
CharSequence |
charSequence()
Returns the character sequence underlying this chunking. |
Set<Chunk> |
chunkSet()
Returns the chunks for this chunking. |
boolean |
equals(Object that)
Returns true if the specified object is a chunking
equal to this one. |
int |
hashCode()
Returns the hash code for this chunking. |
| Method Detail |
|---|
Set<Chunk> chunkSet()
CharSequence charSequence()
boolean equals(Object that)
true if the specified object is a chunking
equal to this one. Equality for chunking is defined by
character sequence yield equality and chunk set equality.
Character sequences are tested for equality with Strings.equalCharSequence(CharSequence,CharSequence)
and chunks are compared as sets with elements tested for
equality using Chunk.equals(Object).
There is a utility implementation of this definition provided
for chunkings in ChunkingImpl.equal(Chunking,Chunking).
equals in class Objectthat - Object to compare.
true if the specified object is a chunking
equal to this one.int hashCode()
hashCode()
= Strings.hashCode(charSequence())
+ 31 * chunkSet().hashCode()
There is a utility implementation of this definition provided
for chunkings in ChunkingImpl.hashCode(Chunking).
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||