List of usage examples for org.apache.commons.collections4.functors StringValueTransformer StringValueTransformer
private StringValueTransformer()
From source file:cz.hobrasoft.pdfmu.error.ErrorType.java
/** * @return true iff each of the constants of this enum is a key in both * {@link #CODES} and {@link #messages}. */// w w w . ja v a2s. co m private static boolean codesAndMessagesAvailable() { ErrorType[] enumKeyArray = ErrorType.values(); List<ErrorType> enumKeyList = Arrays.asList(enumKeyArray); Collection<String> enumKeyStrings = CollectionUtils.collect(enumKeyList, StringValueTransformer.stringValueTransformer()); Set<String> codeKeySet = CODES.stringPropertyNames(); assert messages != null; Set<String> messageKeySet = messages.keySet(); return codeKeySet.containsAll(enumKeyStrings) && messageKeySet.containsAll(enumKeyStrings); }