<commit_before>package jcats.generator

final class EquatableGenerator implements InterfaceGenerator {
	override className() { Constants.EQUATABLE }

	override sourceCode() { '''
		package «Constants.JCATS»;

		import static java.util.Objects.requireNonNull;

		public interface Equatable<A> {

			default boolean isEqualTo(final A other) {
				requireNonNull(other);
				return equals(other);
			}

			default boolean isNotEqualTo(final A other) {
				return !isEqualTo(other);
			}

			default boolean isEqualToAny(final A value, final A... values) {
				requireNonNull(value);
				if (equals(value)) {
					return true;
				}
				for (final A val : values) {
					requireNonNull(val);
					if (equals(val)) {
						return true;
					}
				}
				return false;
			}
		}
	''' }
}<commit_msg>Fixed Equatable methods<commit_after>package jcats.generator

final class EquatableGenerator implements InterfaceGenerator {
	override className() { Constants.EQUATABLE }

	override sourceCode() { '''
		package «Constants.JCATS»;

		import static java.util.Objects.requireNonNull;

		public interface Equatable<A> {

			default boolean isEqualTo(final A other) {
				requireNonNull(other);
				return equals(other);
			}

			default boolean isNotEqualTo(final A other) {
				requireNonNull(other);
				return !equals(other);
			}

			«FOR i : 2 .. Constants.MAX_ARITY»
				default boolean isEqualToAny(«(1..i).map['''final A value«it»'''].join(", ")») {
					«FOR j : 1 .. i»
						requireNonNull(value«j»);
					«ENDFOR»
					return equals(value1)
						«FOR j : 2 .. i»
							|| equals(value«j»)«IF j == i»;«ENDIF»
						«ENDFOR»
				}

			«ENDFOR»
			default boolean isEqualToAny(«(1..Constants.MAX_ARITY+1).map['''final A value«it»'''].join(", ")», final A... values) {
				«FOR j : 1 .. Constants.MAX_ARITY+1»
					requireNonNull(value«j»);
				«ENDFOR»
				requireNonNull(values);
				«FOR j : 1 .. Constants.MAX_ARITY+1»
					if (equals(value«j»)) {
						return true;
					}
				«ENDFOR»
				for (final A val : values) {
					requireNonNull(val);
					if (equals(val)) {
						return true;
					}
				}
				return false;
			}
		}
	''' }
}
{'fraction_non_alphanumeric': 0.13657623947614594, 'fraction_numerical': 0.005144995322731525, 'mean_word_length': 2.9611111111111112, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7151841', 'n_tokens_mistral': 902, 'n_tokens_neox': 703, 'n_words': 216}