I was playing around with generics and now I am curious why I need to cast the "new Special()" to E before adding it to the Set. I know that this is not really needed in this case, because I could use a Set of Base as well...
private static class Base {}
private static class Special extends Base{}
private <E extends Base> Set<E> doSomething(){
Set<E> someset = new HashSet<>();
someset.add(new Special());
return someset;
}