DataDictionary { public boolean isFieldValue(int field, String value) { final Set<String> validValues = fieldValues.get(field); if (validValues == null || validValues.isEmpty()) { return false; } if (validValues.contains(ANY_VALUE)) { return true; } if (!isMultipleValueStringField(field)) { return validValues.contains(value); } for (String val : value.split(" ")) { if (!validValues.contains(val)) { return false; } } return true; } private  DataDictionary();  DataDictionary(String location);  DataDictionary(String location, Supplier<DocumentBuilderFactory> documentBuilderFactorySupplier);  DataDictionary(InputStream in);  DataDictionary(InputStream in, Supplier<DocumentBuilderFactory> documentBuilderFactorySupplier);  DataDictionary(DataDictionary source); String getVersion(); String getFieldName(int field); String getValueName(int field, String value); String getValue(int field, String name); boolean isField(int field); FieldType getFieldType(int field); String getMsgType(String msgName); boolean isMsgType(String msgType); boolean isAdminMessage(String msgType); boolean isAppMessage(String msgType); boolean isMsgField(String msgType, int field); boolean isHeaderField(int field); boolean isTrailerField(int field); int getFieldTag(String name); boolean isRequiredField(String msgType, int field); boolean isRequiredHeaderField(int field); boolean isRequiredTrailerField(int field); boolean hasFieldValue(int field); boolean isFieldValue(int field, String value); boolean isGroup(String msg, int field); boolean isHeaderGroup(int field); GroupInfo getGroup(String msg, int field); boolean isDataField(int field); void setCheckFieldsOutOfOrder(boolean flag); boolean isCheckFieldsOutOfOrder(); boolean isCheckUnorderedGroupFields(); boolean isCheckFieldsHaveValues(); boolean isCheckUserDefinedFields(); boolean isAllowUnknownMessageFields(); void setCheckUnorderedGroupFields(boolean flag); void setCheckFieldsHaveValues(boolean flag); void setCheckUserDefinedFields(boolean flag); void setAllowUnknownMessageFields(boolean allowUnknownFields); void validate(Message message); void validate(Message message, boolean bodyOnly); int getNumMessageCategories(); int[] getOrderedFields(); static final String ANY_VALUE; static final String HEADER_ID; static final String TRAILER_ID; }
@Test public void testWildcardEnumValue() throws Exception { DataDictionary dd = getDictionary(); assertTrue(dd.isFieldValue(65, "FOO")); }