<commit_before>/*******************************************************************************
 * Copyright (c) 2013-2014 CWI
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *
 *   * <NAME> - <EMAIL> - CWI
 *******************************************************************************/
package io.usethesource.vallang.impl.persistent;

import java.util.Arrays;
import java.util.Iterator;
import java.util.Map.Entry;

import io.usethesource.capsule.Map;
import io.usethesource.capsule.util.EqualityComparator;
import io.usethesource.vallang.IMap;
import io.usethesource.vallang.IMapWriter;
import io.usethesource.vallang.ITuple;
import io.usethesource.vallang.IValue;
import io.usethesource.vallang.exceptions.UnexpectedElementTypeException;
import io.usethesource.vallang.type.Type;
import io.usethesource.vallang.util.AbstractTypeBag;
import io.usethesource.vallang.util.EqualityUtils;

final class MapWriter implements IMapWriter {

	private static final EqualityComparator<Object> equivalenceComparator =
			EqualityUtils.getEquivalenceComparator();

	protected AbstractTypeBag keyTypeBag;
	protected AbstractTypeBag valTypeBag;
	protected final Map.Transient<IValue, IValue> mapContent;

	protected final boolean checkUpperBound;
	protected final Type upperBoundKeyType;
	protected final Type upperBoundValType;
	protected IMap constructedMap;

	MapWriter() {<commit_msg>made more fields private<commit_after>/*******************************************************************************
 * Copyright (c) 2013-2014 CWI
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *
 *   * <NAME> - <EMAIL> - CWI
 *******************************************************************************/
package io.usethesource.vallang.impl.persistent;

import java.util.Arrays;
import java.util.Iterator;
import java.util.Map.Entry;

import io.usethesource.capsule.Map;
import io.usethesource.capsule.util.EqualityComparator;
import io.usethesource.vallang.IMap;
import io.usethesource.vallang.IMapWriter;
import io.usethesource.vallang.ITuple;
import io.usethesource.vallang.IValue;
import io.usethesource.vallang.exceptions.UnexpectedElementTypeException;
import io.usethesource.vallang.type.Type;
import io.usethesource.vallang.util.AbstractTypeBag;
import io.usethesource.vallang.util.EqualityUtils;

final class MapWriter implements IMapWriter {

	private static final EqualityComparator<Object> equivalenceComparator =
			EqualityUtils.getEquivalenceComparator();

	private AbstractTypeBag keyTypeBag;
	private AbstractTypeBag valTypeBag;
	private final Map.Transient<IValue, IValue> mapContent;

	private final boolean checkUpperBound;
	private final Type upperBoundKeyType;
	private final Type upperBoundValType;
	private IMap constructedMap;

	MapWriter() {
{'fraction_non_alphanumeric': 0.17361328737073017, 'fraction_numerical': 0.007521153243497336, 'mean_word_length': 6.388888888888889, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5396781', 'n_tokens_mistral': 922, 'n_tokens_neox': 885, 'n_words': 213}