Destry Gustin

Compare String to Type

Discussion created by Destry Gustin on Mar 4, 2009
Latest reply on Mar 4, 2009 by Destry Gustin

Got a rookie question here.

Using Blaze Rules for Java

 

If I have a type USStateType that is a string with the abbreviations of the states (CA, FL, GA, etc) how do I compare a string property of an object to the type.  

 

I tried MyObject.state.compareToIgnoreCase(USStateType.FL) but it does not work.  I'm sure this is a basic Java syntax, but I'm learning Java at the same time as trying to write in Blaze.

 

Thanks,

 

Destry

Outcomes