Class RecordMap.Builder

    • Constructor Detail

      • Builder

        public Builder​(RecordTokenType inputType,
                       String[] keyFieldNames,
                       int initialCapacity)
        Create a new record map builder.
        Parameters:
        inputType - the type of the data source
        keyFieldNames - names of fields within the data source to use as keys for index creation
        initialCapacity - the initial capacity of the cache
    • Method Detail

      • append

        public void append​(TokenValued value)
        Description copied from interface: TokenAppendable
        Appends 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:
        append in interface TokenAppendable
        Parameters:
        value - the token value to append
      • append

        public void append​(TokenValued value,
                           long count)
        Description copied from interface: TokenAppendable
        Appends 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:
        append in interface TokenAppendable
        Parameters:
        value - the token value to append
        count - the number of copies to append
      • append

        public void append​(TokenSequence data)
        Description copied from interface: TokenAppendable
        Appends 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:
        append in interface TokenAppendable
        Parameters:
        data - the sequence to append
      • append

        public void append​(TokenSequence data,
                           int start,
                           int length)
        Description copied from interface: TokenAppendable
        Appends 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:
        append in interface TokenAppendable
        Parameters:
        data - the sequence containing tokens to append
        start - the starting index of the subsequence in the source
        length - the length of the subsequence
      • build

        public RecordMap build()
        Creates the RecordMap. Note that as a side effect of this call, the state of the builder is reset; subsequent calls to append will begin constructing a new map.
        Returns:
        a newly created record map.