class Converters {

    public static <T, V> Converter<T, V> get(Class<T> from, Class<V> to) {
        if (to == Integer.class || to == int.class) {
            if (from == Byte.class || from == byte.class) {
                return (Converter<T, V>) byteToInteger;
            } else if (from == Short.class || from == short.class) {
                return (Converter<T, V>) shortToInteger;
            } else if (from == Long.class || from == long.class) {
                return (Converter<T, V>) longToInteger;
            } else {
                return null;
            }
        } else {
            return null;
        }
    }

}