<commit_before>package com.github.xtension

import com.google.common.annotations.Beta

final class ObjectExtensions {

	private new() {
	}

	/**
	 * Determines whether the value matches any value in the given list.
	 * <p>Example:
	 * <p>{@code 'a'.in('a', 'b', 'c')} (returns {@code true})
	 */
	@Beta
	def static <T> boolean in(T obj, T other, T other2, T... others) {
		obj == other || obj == other2 || others.contains(obj)
	}

	/**
	 * Determines whether the value does not match any value in the given list.
	 * <p>Example:
	 * <p>{@code 'a'.notIn('c', 'd', 'e')} (returns {@code true})
	 */
	@Beta
	def static <T> boolean notIn(T obj, T other, T other2, T... others) {
		obj != other && obj != other2 && !others.contains(obj)
	}
}<commit_msg>in(Iterable), notIn(Iterable)<commit_after>package com.github.xtension

import com.google.common.annotations.Beta
import com.google.common.collect.Iterables

final class ObjectExtensions {

	private new() {
	}

	/**
	 * Determines whether the value matches any value in the given list.
	 * <p>Example:
	 * <p>{@code 'a'.in('a', 'b', 'c')} (returns {@code true})
	 */
	@Beta
	def static <T> boolean in(T obj, T other, T other2, T... others) {
		obj == other || obj == other2 || others.contains(obj)
	}

	/**
	 * Determines whether the value matches any value in the given iterable.
	 * <p>Example:
	 * <p>{@code 'a'.in(#['a', 'b', 'c'])} (returns {@code true})
	 */
	@Beta
	def static <T> boolean in(T obj, Iterable<? super T> iterable) {
		Iterables::contains(iterable, obj)
	}

	/**
	 * Determines whether the value does not match any value in the given list.
	 * <p>Example:
	 * <p>{@code 'a'.notIn('c', 'd', 'e')} (returns {@code true})
	 */
	@Beta
	def static <T> boolean notIn(T obj, T other, T other2, T... others) {
		obj != other && obj != other2 && !others.contains(obj)
	}

	/**
	 * Determines whether the value does not match any value in the given iterable.
	 * <p>Example:
	 * <p>{@code 'a'.in(#['c', 'd', 'e'])} (returns {@code true})
	 */
	@Beta
	def static <T> boolean notIn(T obj, Iterable<? super T> iterable) {
		!Iterables::contains(iterable, obj)
	}
}
{'fraction_non_alphanumeric': 0.1820754716981132, 'fraction_numerical': 0.0037735849056603774, 'mean_word_length': 3.610869565217391, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '6644049', 'n_tokens_mistral': 783, 'n_tokens_neox': 740, 'n_words': 239}