Quantcast
Channel: User user1944408 - Stack Overflow
Viewing all articles
Browse latest Browse all 26

Comment by user1944408 on Why shouldn't Java enum literals be able to have generic type parameters?

$
0
0
But then you could not do assignment like this MyEnum<Int> blabla = valueOf("some double property"); because the types are not compatible. Also you want in that case to get null because you want to return MyEnum<Int> which does not exists for double property name and you cannot make that method work properly because of erasure.

Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>