This is wrong, it does not take itself as an argument. It takes a captured generic as it's argument. Ofc you can fill in Item as the captured generic, but that screenshot is missing, no?
I mean, I could see how that could be useful, for example, if you wanted to expand the stuff in Item later on or implement an interface on it so that you can use items of type A in places where you need to satisfy some generic bound.
21
u/[deleted] Jan 03 '23
Wtf is that font
4
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jan 03 '23
Image Transcription: Code
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
7
u/TNT10128 Jan 03 '23
I'm more concerned about that font. Please get some help.
2
u/Sanduhr32 Jan 07 '23
Why is this bad code?
1
u/Makefile_dot_in Jan 05 '23
I mean, I could see how that could be useful, for example, if you wanted to expand the stuff in
Itemlater on or implement an interface on it so that you can use items of typeAin places where you need to satisfy some generic bound.1
u/gscaparrotti Jan 08 '23
You literally have the same class in Apache Commons (is called MutableObject)