<commit_before>/* ***** BEGIN LICENSE BLOCK *****
 *
 * This file is part of Weave.
 *
 * The Initial Developer of Weave is the Institute for Visualization
 * and Perception Research at the University of Massachusetts Lowell.
 * Portions created by the Initial Developer are Copyright (C) 2008-2015
 * the Initial Developer. All Rights Reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 * 
 * ***** END LICENSE BLOCK ***** */

package weavejs.data.column
{
	import weavejs.api.data.IQualifiedKey;
	import weavejs.core.LinkableVariable;
	import weavejs.data.EquationColumnLib;
	import weavejs.util.Dictionary2D;
	import weavejs.util.StandardLib;
	
	/**
	 * AlwaysDefinedColumn
	 * 
	 * @author adufilie
	 */
	public class AlwaysDefinedColumn extends ExtendedDynamicColumn
	{
		public function AlwaysDefinedColumn(defaultValue:* = undefined, defaultValueVerifier:Function = null)
		{
			super();
			_defaultValue = new LinkableVariable(defaultValue, defaultValueVerifier);
			Weave.linkableChild(this, _defaultValue, handleDefaultValueChange);
		}

		/**
		 * @param key A key to test.
		 * @return true if the key exists in this IKeySet.
		 */
		override public function containsKey(key:IQualifiedKey):Boolean
		{
			return true;
		}
		
		/**
		 * This sessioned property contains the default value to be returned
		 * when the referenced column does not define a value for a given key.
		 */
		private var _defaultValue:LinkableVariable;
		public function get defaultValue():LinkableVariable<commit_msg>fixed bug initializing LinkableVariable<commit_after>/* ***** BEGIN LICENSE BLOCK *****
 *
 * This file is part of Weave.
 *
 * The Initial Developer of Weave is the Institute for Visualization
 * and Perception Research at the University of Massachusetts Lowell.
 * Portions created by the Initial Developer are Copyright (C) 2008-2015
 * the Initial Developer. All Rights Reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 * 
 * ***** END LICENSE BLOCK ***** */

package weavejs.data.column
{
	import weavejs.api.data.IQualifiedKey;
	import weavejs.core.LinkableVariable;
	import weavejs.data.EquationColumnLib;
	import weavejs.util.Dictionary2D;
	import weavejs.util.StandardLib;
	
	/**
	 * AlwaysDefinedColumn
	 * 
	 * @author adufilie
	 */
	public class AlwaysDefinedColumn extends ExtendedDynamicColumn
	{
		public function AlwaysDefinedColumn(defaultValue:* = undefined, defaultValueVerifier:Function = null)
		{
			super();
			_defaultValue = new LinkableVariable(null, defaultValueVerifier, defaultValue);
			Weave.linkableChild(this, _defaultValue, handleDefaultValueChange);
		}

		/**
		 * @param key A key to test.
		 * @return true if the key exists in this IKeySet.
		 */
		override public function containsKey(key:IQualifiedKey):Boolean
		{
			return true;
		}
		
		/**
		 * This sessioned property contains the default value to be returned
		 * when the referenced column does not define a value for a given key.
		 */
		private var _defaultValue:LinkableVariable;
		public function get defaultValue():LinkableVariable
{'fraction_non_alphanumeric': 0.08640142517814726, 'fraction_numerical': 0.007719714964370546, 'mean_word_length': 3.991111111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5932040', 'n_tokens_mistral': 1059, 'n_tokens_neox': 928, 'n_words': 337}