All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.thksystems.util.lang.EnumUtils Maven / Gradle / Ivy

Go to download

Commons for lang, crypto, xml, dom, text, csv, reflection, annotations, parsing, ...

There is a newer version: 4.3.3
Show newest version
/*
 * tksCommons
 * 
 * Author : Thomas Kuhlmann (ThK-Systems, http://www.thk-systems.de) License : LGPL (https://www.gnu.org/licenses/lgpl.html)
 */
package de.thksystems.util.lang;

import java.util.Collection;

public final class EnumUtils {

	private EnumUtils() {
	}

	/**
	 * Returns true, if the entry is part of list.
	 * 
	 * @deprecated Use {@link Collection#contains(Object)}
	 */
	@Deprecated
	@SafeVarargs
	public static  boolean match(E entry, E... list) {
		if (list.length == 0) {
			return false;
		}
		for (E listEntry : list) {
			if (listEntry == entry) {
				return true;
			}
		}
		return false;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy