MCPcopy Create free account
hub / github.com/BaseXdb/basex / oneOf

Method oneOf

basex-core/src/main/java/org/basex/util/Enums.java:42–48  ·  view source on GitHub ↗

Checks if this is one of the specified errors. @param enum value @param value value to be found @param candidates candidates @return result of check

(final V value, final V... candidates)

Source from the content-addressed store, hash-verified

40 * @return result of check
41 */
42 @SafeVarargs
43 public static <V extends Enum<V>> boolean oneOf(final V value, final V... candidates) {
44 for(final V c : candidates) {
45 if(value == c) return true;
46 }
47 return false;
48 }
49
50 /**
51 * Helper function for converting enumeration names to strings.

Callers 5

oneOfMethod · 0.95
oneOfMethod · 0.95
oneOfMethod · 0.95
oneOfMethod · 0.95
oneOfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected