On Tue, Aug 18, 2015 at 1:19 PM, <[email protected]> wrote: > Hi, Can you please elaborate? I am confused :-)
You did note that the two pieces of code are different, right? See http://docs.scala-lang.org/tutorials/tour/pattern-matching.html for how to match things in Scala, especially the "typed pattern" example. > -----Original Message----- > From: Marcelo Vanzin [mailto:[email protected]] > Sent: Tuesday, August 18, 2015 5:15 PM > To: Ellafi, Saif A. > Cc: [email protected]; [email protected] > Subject: Re: Scala: How to match a java object???? > > On Tue, Aug 18, 2015 at 12:59 PM, <[email protected]> wrote: >> >> 5 match { case java.math.BigDecimal => 2 } > > 5 match { case _: java.math.BigDecimal => 2 } > > -- > Marcelo -- Marcelo --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
