Submission: switch (...) instanceof feature

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Mon May 4 14:07:07 PDT 2009


My suggestion for switch on objects was as below:

switch(obj){
      case String str: println("obj instance of String and str is
(String)obj"); break;  // instanceof case
      case obj2 : println("obj  equals obj2"); break;     // equals case
     ....
}


see url for more details: My wishlist and Ideas for java 7 as java
developer  <http://mail.openjdk.java.net/pipermail/coin-dev/2009-April/001595.html>

Best Regards
Ali Ebrahimi



More information about the coin-dev mailing list