<commit_before>/*
 * Copyright 2015 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.jqno.equalsverifier;

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

import nl.jqno.equalsverifier.util.ClassAccessor;
import nl.jqno.equalsverifier.util.PrefabValues;

public class Configuration<T> {
	private final Class<T> type;
	private final PrefabValues prefabValues;
	private final EnumSet<Warning> warningsToSuppress;
	private final CachedHashCodeInitializer<T> cachedHashCodeInitializer;
	private final boolean usingGetClass;
	private final boolean allFieldsShouldBeUsed;
	private final Set<String> allFieldsShouldBeUsedExceptions;
	
	private Configuration(Class<T> type, PrefabValues prefabValues, EnumSet<Warning> warningsToSuppress,
			CachedHashCodeInitializer<T> cachedHashCodeInitializer, boolean usingGetClass,
			boolean allFieldsShouldBeUsed, Set<String> allFieldsShouldBeUsedExceptions) {
		
		this.type = type;
		this.prefabValues = prefabValues;
		this.warningsToSuppress = warningsToSuppress;
		this.cachedHashCodeInitializer = cachedHashCodeInitializer;
		this.usingGetClass = usingGetClass;
		this.allFieldsShouldBeUsed = allFieldsShouldBeUsed;
		this.allFieldsShouldBeUsedExceptions = allFieldsShouldBeUsedExceptions;
	}
	
	public static <T> Configuration<T> of(Class<T> type) {
		return new Configuration<T>(type, new PrefabValues(), EnumSet.noneOf(Warning.class),
				CachedHashCodeInitializer.<T>passthrough(), false, false, new HashSet<String>());
	}
	
	public Class<T> getType() {
		return type;
	}
	
	public PrefabValues getPrefabValues() {
		return prefabValues;
	}
	
	public Configuration<T> withWarningsToSuppress(EnumSet<Warning> value) {
		return new Configuration<T>(type, prefabValues, value, cachedHashCodeInitializer, usingGetClass,
				allFieldsShouldBeUsed, allFieldsShouldBeUsedExceptions);
	}
	
	public EnumSet<Warning> getWarningsToSuppress() {
		return EnumSet.copyOf(warningsToSuppress);
	}
	
	public Configuration<T> withCachedHashCodeInitializer(CachedHashCodeInitializer<T> value) {
		return new Configuration<T>(type, prefabValues, warningsToSuppress, value, usingGetClass,
				allFieldsShouldBeUsed, allFieldsShouldBeUsedExceptions);
	}
	
	public CachedHashCodeInitializer<T> getCachedHashCodeInitializer() {
		return cachedHashCodeInitializer;
	}
	
	public Configuration<T> withUsingGetClass() {
		return new Configuration<T>(type, prefabValues, warningsToSuppress, cachedHashCodeInitializer, true,
				allFieldsShouldBeUsed, allFieldsShouldBeUsedExceptions);
	}

	public boolean isUsingGetClass() {
		return usingGetClass;
	}

	public Configuration<T> withAllFieldsShouldBeUsed() {
		return new Configuration<T>(type, prefabValues, warningsToSuppress, cachedHashCodeInitializer, usingGetClass,
				true, allFieldsShouldBeUsedExceptions);
	}

	public boolean isAllFieldsShouldBeUsed() {
		return allFieldsShouldBeUsed;
	}

	public Configuration<T> withAllFieldsShouldBeUsedExceptions(String[] value) {
		return new Configuration<T>(type, prefabValues, warningsToSuppress, cachedHashCodeInitializer, usingGetClass,
				allFieldsShouldBeUsed, new HashSet<String>(Arrays.asList(value)));
	}

	public Set<String> getAllFieldsShouldBeUsedExceptions() {
		return Collections.unmodifiableSet(allFieldsShouldBeUsedExceptions);
	}

	public ClassAccessor<T> createClassAccessor() {
		return ClassAccessor.of(type, prefabValues, warningsToSuppress.contains(Warning.ANNOTATION));
	}
}<commit_msg>Alphabetise configuration items<commit_after>/*
 * Copyright 2015 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.jqno.equalsverifier;

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

import nl.jqno.equalsverifier.util.ClassAccessor;
import nl.jqno.equalsverifier.util.PrefabValues;

public class Configuration<T> {
	private final Class<T> type;
	private final PrefabValues prefabValues;

	private final boolean allFieldsShouldBeUsed;
	private final Set<String> allFieldsShouldBeUsedExceptions;
	private final CachedHashCodeInitializer<T> cachedHashCodeInitializer;
	private final boolean usingGetClass;
	private final EnumSet<Warning> warningsToSuppress;

	private Configuration(Class<T> type, PrefabValues prefabValues, boolean allFieldsShouldBeUsed,
	                      Set<String> allFieldsShouldBeUsedExceptions, CachedHashCodeInitializer<T> cachedHashCodeInitializer,
	                      boolean usingGetClass, EnumSet<Warning> warningsToSuppress) {
		
		this.type = type;
		this.prefabValues = prefabValues;
		this.allFieldsShouldBeUsed = allFieldsShouldBeUsed;
		this.allFieldsShouldBeUsedExceptions = allFieldsShouldBeUsedExceptions;
		this.cachedHashCodeInitializer = cachedHashCodeInitializer;
		this.usingGetClass = usingGetClass;
		this.warningsToSuppress = warningsToSuppress;
	}
	
	public static <T> Configuration<T> of(Class<T> type) {
		return new Configuration<T>(type, new PrefabValues(), false, new HashSet<String>(),
				CachedHashCodeInitializer.<T>passthrough(), false, EnumSet.noneOf(Warning.class));
	}
	
	public Class<T> getType() {
		return type;
	}
	
	public PrefabValues getPrefabValues() {
		return prefabValues;
	}

	public Configuration<T> withAllFieldsShouldBeUsed() {
		return new Configuration<T>(type, prefabValues, true, allFieldsShouldBeUsedExceptions,
				cachedHashCodeInitializer, usingGetClass, warningsToSuppress);
	}

	public boolean isAllFieldsShouldBeUsed() {
		return allFieldsShouldBeUsed;
	}

	public Configuration<T> withAllFieldsShouldBeUsedExceptions(String[] value) {
		return new Configuration<T>(type, prefabValues, allFieldsShouldBeUsed, new HashSet<String>(Arrays.asList(value)),
				cachedHashCodeInitializer, usingGetClass, warningsToSuppress);
	}

	public Set<String> getAllFieldsShouldBeUsedExceptions() {
		return Collections.unmodifiableSet(allFieldsShouldBeUsedExceptions);
	}

	public Configuration<T> withCachedHashCodeInitializer(CachedHashCodeInitializer<T> value) {
		return new Configuration<T>(type, prefabValues, allFieldsShouldBeUsed, allFieldsShouldBeUsedExceptions, value,
				usingGetClass, warningsToSuppress);
	}
	
	public CachedHashCodeInitializer<T> getCachedHashCodeInitializer() {
		return cachedHashCodeInitializer;
	}
	
	public Configuration<T> withUsingGetClass() {
		return new Configuration<T>(type, prefabValues, allFieldsShouldBeUsed, allFieldsShouldBeUsedExceptions,
				cachedHashCodeInitializer, true, warningsToSuppress);
	}

	public boolean isUsingGetClass() {
		return usingGetClass;
	}

	public Configuration<T> withWarningsToSuppress(EnumSet<Warning> value) {
		return new Configuration<T>(type, prefabValues, allFieldsShouldBeUsed, allFieldsShouldBeUsedExceptions,
				cachedHashCodeInitializer, usingGetClass, value);
	}

	public EnumSet<Warning> getWarningsToSuppress() {
		return EnumSet.copyOf(warningsToSuppress);
	}

	public ClassAccessor<T> createClassAccessor() {
		return ClassAccessor.of(type, prefabValues, warningsToSuppress.contains(Warning.ANNOTATION));
	}
}
{'fraction_non_alphanumeric': 0.08147692307692307, 'fraction_numerical': 0.001969230769230769, 'mean_word_length': 6.255357142857143, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, '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': '4888974', 'n_tokens_mistral': 2438, 'n_tokens_neox': 2309, 'n_words': 564}