|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.chunk.ChunkFactory
public class ChunkFactory
The ChunkFactory provides static factory methods for
creating chunks from components. Each chunk must specify the index
of its first character and the index of one past its last
character. A chunk may optionally specify a string-based type and
score. If a type or score is not specified, the default values
DEFAULT_CHUNK_TYPE and DEFAULT_CHUNK_SCORE,
respecitively.
| Field Summary | |
|---|---|
static double |
DEFAULT_CHUNK_SCORE
The default chunk score, Double.NEGATIVE_INFINITY. |
static String |
DEFAULT_CHUNK_TYPE
The default chunk type, "CHUNK". |
| Method Summary | |
|---|---|
static Chunk |
createChunk(int start,
int end)
Return a chunk with the specified start and end positions, with default type and score. |
static Chunk |
createChunk(int start,
int end,
double score)
Return a chunk with the specified start and end positions, specified score and default type. |
static Chunk |
createChunk(int start,
int end,
String type)
Return a chunk with the specified start and end positions, specified type and default score. |
static Chunk |
createChunk(int start,
int end,
String type,
double score)
Return a chunk with the specified start and end positions, type and score. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_CHUNK_TYPE
"CHUNK".
public static final double DEFAULT_CHUNK_SCORE
Double.NEGATIVE_INFINITY. This
value, unlike Double.NaN, is less than other double
values and equal (==) to itself.
| Method Detail |
|---|
public static Chunk createChunk(int start,
int end)
DEFAULT_CHUNK_TYPE and default score by DEFAULT_CHUNK_SCORE.
start - Index of the first character in the chunk.end - Index of one past the last character in the chunk.
IllegalArgumentException - If start is less than zero or
end is less than start.
public static Chunk createChunk(int start,
int end,
String type)
DEFAULT_CHUNK_SCORE.
start - Index of the first character in the chunk.end - Index of one past the last character in the chunk.type - Type of the chunk created.
IllegalArgumentException - If start is less than zero or
end is less than start.
public static Chunk createChunk(int start,
int end,
double score)
DEFAULT_CHUNK_TYPE.
start - Index of the first character in the chunk.end - Index of one past the last character in the chunk.score - Score of created chunk.
IllegalArgumentException - If start is less than zero or
end is less than start.
public static Chunk createChunk(int start,
int end,
String type,
double score)
start - Index of the first character in the chunk.end - Index of one past the last character in the chunk.type - Type of the chunk created.score - Score of created chunk.
IllegalArgumentException - If start is less than zero or
end is less than start.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||