<commit_before>package org.adligo.tests4j.models.shared.dependency;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

import org.adligo.tests4j.models.shared.xml.I_XML_Builder;

/**
 * a immutable implementation of {@link I_ClassReferences}
 * @author scott
 *
 */
public class ClassReferencesLocal extends ClassParentsLocal implements I_ClassReferencesLocal {
	private Set<I_ClassAliasLocal> circularReferences;
	private Set<I_ClassParentsLocal> references;
	
	public ClassReferencesLocal(I_ClassReferencesLocal p) {
		super(p);
		
		
		Set<I_ClassAliasLocal> circles = p.getCircularReferencesLocal();
		if (circles != null && circles.size() >= 1) {
			circularReferences = new HashSet<I_ClassAliasLocal>();
			for (I_ClassAliasLocal loc: circles) {
				circularReferences.add(new ClassAliasLocal(loc));
			}
			circularReferences = Collections.unmodifiableSet(circularReferences);
		} else {
			circularReferences = Collections.emptySet();
		}<commit_msg>ok 13 seconds down from 26, about half not bad now for feature additions.<commit_after>package org.adligo.tests4j.models.shared.dependency;

import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.adligo.tests4j.models.shared.xml.I_XML_Builder;

/**
 * a immutable implementation of {@link I_ClassReferences}
 * @author scott
 *
 */
public class ClassReferencesLocal extends ClassParentsLocal implements I_ClassReferencesLocal {
	private Set<I_ClassAliasLocal> circularReferences;
	private Set<I_ClassParentsLocal> references;
	
	public ClassReferencesLocal(I_ClassParentsLocal p) {
		super(p);
		List<I_ClassParentsLocal> refs = p.getParentsLocal();
		if (refs != null && refs.size() >= 1) {
			references = new HashSet<I_ClassParentsLocal>();
			for (I_ClassParentsLocal loc: refs) {
				references.add(new ClassParentsLocal(loc));
			}
			references = Collections.unmodifiableSet(references);
		} else {
			references = Collections.emptySet();
		}
	}
	
	public ClassReferencesLocal(I_ClassReferencesLocal p) {
		super(p);
		
		
		Set<I_ClassAliasLocal> circles = p.getCircularReferencesLocal();
		if (circles != null && circles.size() >= 1) {
			circularReferences = new HashSet<I_ClassAliasLocal>();
			for (I_ClassAliasLocal loc: circles) {
				circularReferences.add(new ClassAliasLocal(loc));
			}
			circularReferences = Collections.unmodifiableSet(circularReferences);
		} else {
			circularReferences = Collections.emptySet();
		}
{'fraction_non_alphanumeric': 0.10426731078904992, 'fraction_numerical': 0.004428341384863124, 'mean_word_length': 5.339285714285714, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3111645', 'n_tokens_mistral': 859, 'n_tokens_neox': 751, 'n_words': 155}