class UriEncoding {

    public static String decode(final String source, final EncodingType encType) {
        requireNonNull(source);
        requireNonNull(encType);

        if (encType == EncodingType.FORM_URL_ENCODED) {
            return decodeFormUrlEncoded(source);
        } else {
            return decodeRFC3986(source);
        }
    }

}