```
public static <T extends Collection<? extends Object>,E extends Collection<? super Number>> void parseCollection(T src, E  dest, Class<?> clazz){
        for (Object obj : src) {
            if(clazz.equals(Long.class)){
                dest.add(Long.valueOf(obj.toString()));
            }else if(clazz.equals(Integer.class)){
                dest.add(Integer.valueOf(obj.toString()));
            }
        }
    }

```

When I call this fuction with `Set<String>` as src and `List<Long>` as dest
Its showing a compile time exception saying : **"*Bound mismatch: The generic method parseCollection(T, E, Class) of type GenericMethods is not applicable for the arguments (Set, List, Class). The inferred type List is not a valid substitute for the bounded parameter >*"**

Function has been called something like this :

```
Set<String> src = new HashSet<String>();
        src.add("1");
        src.add("2");
        src.add("3");
        src.add("4");

        List<Long> dest = new ArrayList<Long>();
        parseCollection(src, dest, Long.class);// exception
        System.out.println(dest);

```