<commit_before>package org.finra.datagenerator.consumer.defaults;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;

/**
 * Created by RobbinBr on 5/18/2014.
 */
public class ConsumerResult {

    private final Map<String, String> dataMap = new HashMap<String, String>();
    private final AtomicBoolean exitFlag;
    private final long maxNumberOfLines;

    public ConsumerResult(long maxNumberOfLines, AtomicBoolean exitFlag) {
        this.maxNumberOfLines = maxNumberOfLines;
        this.exitFlag = exitFlag;
    }

    public Map<String, String> getDataMap() {
        return dataMap;
    }

    public AtomicBoolean getExitFlag() {
        return exitFlag;
    }

    public long getMaxNumberOfLines() {
        return maxNumberOfLines;
    }
}<commit_msg>Update ConsumerResult to handle pipe-deliminting formatting<commit_after>package org.finra.datagenerator.consumer.defaults;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;

/**
 * Created by RobbinBr on 5/18/2014.
 */
public class ConsumerResult {

    private final Map<String, String> dataMap = new HashMap<String, String>();
    private final AtomicBoolean exitFlag;
    private final long maxNumberOfLines;

    public ConsumerResult(long maxNumberOfLines, AtomicBoolean exitFlag) {
        this.maxNumberOfLines = maxNumberOfLines;
        this.exitFlag = exitFlag;
    }

    public Map<String, String> getDataMap() {
        return dataMap;
    }

    public AtomicBoolean getExitFlag() {
        return exitFlag;
    }

    public long getMaxNumberOfLines() {
        return maxNumberOfLines;
    }

    public String getPipeDelimited(){
        StringBuilder b = new StringBuilder(1024);
        for (Map.Entry<String, String> entry : getDataMap().entrySet()) {
            if (b.length() > 0) {
                b.append('|');
            }
            b.append(entry.getValue());
        }

        return b.toString();
    }
}
{'fraction_non_alphanumeric': 0.09545227386306847, 'fraction_numerical': 0.009495252373813094, 'mean_word_length': 2.9801192842942346, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5454067', 'n_tokens_mistral': 600, 'n_tokens_neox': 559, 'n_words': 138}