java.lang.Object
com.pervasive.datarush.tokens.record.RecordMap.Builder
- All Implemented Interfaces:
TokenAppendable
- Enclosing class:
- RecordMap
Factory for creating record maps. The expected usage is to construct the contents
using methods from
TokenAppendable. A final call to {build() performs
the sorting and indexing.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(RecordTokenType inputType, String[] keyFieldNames, int initialCapacity) Create a new record map builder. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(TokenSequence data) Appends all tokens in the specified sequence to this sequence.voidappend(TokenSequence data, int start, int length) Appends a subsequence of tokens in the specified sequence to this sequence.voidappend(TokenValued value) Appends the specified token value to this sequence.voidappend(TokenValued value, long count) Appends the specified token value to this sequence multiple times.build()Creates the RecordMap.
-
Constructor Details
-
Builder
Create a new record map builder.- Parameters:
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 cache
-
-
Method Details
-
append
Description copied from interface:TokenAppendableAppends the specified token value to this sequence.The data types of the sequence and the value must be compatible. If the types are not identical, appropriate coercion will be attempted.
- Specified by:
appendin interfaceTokenAppendable- Parameters:
value- the token value to append
-
append
Description copied from interface:TokenAppendableAppends the specified token value to this sequence multiple times.The data types of the sequence and the value must be compatible. If the types are not identical, appropriate coercion will be attempted.
- Specified by:
appendin interfaceTokenAppendable- Parameters:
value- the token value to appendcount- the number of copies to append
-
append
Description copied from interface:TokenAppendableAppends all tokens in the specified sequence to this sequence.The data types of the sequences must be compatible. If not identical, appropriate coercion will be attempted.
- Specified by:
appendin interfaceTokenAppendable- Parameters:
data- the sequence to append
-
append
Description copied from interface:TokenAppendableAppends a subsequence of tokens in the specified sequence to this sequence.The data types of the sequences must be compatible. If not identical, appropriate coercion will be attempted.
- Specified by:
appendin interfaceTokenAppendable- Parameters:
data- the sequence containing tokens to appendstart- the starting index of the subsequence in the sourcelength- the length of the subsequence
-
build
Creates the RecordMap. Note that as a side effect of this call, the state of the builder is reset; subsequent calls toappendwill begin constructing a new map.- Returns:
- a newly created record map.
-