@Override
    public T parseValue(String value) throws GuacamoleException {

        // Simply pass through null values
        if (value == null)
            return null;

        // Translate values based on explicit string/constant mapping
        T parsedValue = valueMapping.get(value);
        if (parsedValue != null)
            return parsedValue;

        // Produce human-readable error if no matching constant is found
        List<String> legalValues = new ArrayList<>(valueMapping.keySet());
        Collections.sort(legalValues);

        throw new GuacamoleServerException(String.format("\"%s\" is not a "
                + "valid value for property \"%s\". Valid values are: \"%s\"",
                value, getName(), String.join("\", \"", legalValues)));

    }
Creates a new EnumGuacamoleProperty which parses the given String
property values into the given corresponding enum constants.

@param key
    The first String value to accept as a legal value of this property.

@param value
    The enum constant that {@code key} should be parsed into.

@param additional
    Any additional key/value pairs to be included beyond the first. This
    array must be even in length, where each even element is a String
    key and each odd element is the enum constant value to be associated
    with the key immediately preceding it.

@throws IllegalArgumentException
    If any provided key is not a String, if any provided value is not
    an enum constant from the given enum type, or if the length of
    {@code additional} is not even.
guacamole-ext/src/main/java/org/apache/guacamole/properties/EnumGuacamoleProperty.java