Before I start, I know there are a bunch of answers to this question that suggest alternate approaches. I\'m looking for assistance to this particular approach as to whethe
Java currently has a draft to support this. See here. The syntax looks like this
switch (obj) { case Integer i: handleI(i); break; case Byte b: handleB(b); break; case Long l: handleL(l); break; case Double d: handleD(d); break; case String s: handleS(s); break default: handle(obj); }