de.thksystems.util.lang.EnumUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cumin Show documentation
Show all versions of cumin Show documentation
Commons for lang, crypto, xml, dom, text, csv, reflection, annotations, parsing, ...
/*
* 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;
}
}