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 tkscommons Show documentation
Show all versions of tkscommons Show documentation
Commons for lang, crypto, dom, text, csv, reflection, parsing, xtreams...
/*
* 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;
public final class EnumUtils {
private EnumUtils() {
}
@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;
}
}