public static class RecordMap.Builder extends Object implements TokenAppendable
TokenAppendable
. A final call to {build()
performs
the sorting and indexing.Constructor and Description |
---|
Builder(RecordTokenType inputType,
String[] keyFieldNames,
int initialCapacity)
Create a new record map builder.
|
Modifier and Type | Method and Description |
---|---|
void |
append(TokenSequence data)
Appends all tokens in the specified sequence to this
sequence.
|
void |
append(TokenSequence data,
int start,
int length)
Appends a subsequence of tokens in the specified sequence
to this sequence.
|
void |
append(TokenValued value)
Appends the specified token value to this sequence.
|
void |
append(TokenValued value,
long count)
Appends the specified token value to this sequence
multiple times.
|
RecordMap |
build()
Creates the RecordMap.
|
public Builder(RecordTokenType inputType, String[] keyFieldNames, int initialCapacity)
inputType
- the type of the data sourcekeyFieldNames
- names of fields within the data source to use as keys
for index creationinitialCapacity
- the initial capacity of the cachepublic void append(TokenValued value)
TokenAppendable
The data types of the sequence and the value must be compatible. If the types are not identical, appropriate coercion will be attempted.
append
in interface TokenAppendable
value
- the token value to appendpublic void append(TokenValued value, long count)
TokenAppendable
The data types of the sequence and the value must be compatible. If the types are not identical, appropriate coercion will be attempted.
append
in interface TokenAppendable
value
- the token value to appendcount
- the number of copies to appendpublic void append(TokenSequence data)
TokenAppendable
The data types of the sequences must be compatible. If not identical, appropriate coercion will be attempted.
append
in interface TokenAppendable
data
- the sequence to appendpublic void append(TokenSequence data, int start, int length)
TokenAppendable
The data types of the sequences must be compatible. If not identical, appropriate coercion will be attempted.
append
in interface TokenAppendable
data
- the sequence containing tokens to appendstart
- the starting index of the subsequence in the sourcelength
- the length of the subsequencepublic RecordMap build()
append
will begin constructing
a new map.Copyright © 2016 Actian Corporation. All rights reserved.