Example usage for org.apache.commons.collections4.functors StringValueTransformer StringValueTransformer

List of usage examples for org.apache.commons.collections4.functors StringValueTransformer StringValueTransformer

Introduction

In this page you can find the example usage for org.apache.commons.collections4.functors StringValueTransformer StringValueTransformer.

Prototype

private StringValueTransformer() 

Source Link

Document

Restricted constructor.

Usage

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);
}