You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Hes Siemelink <he...@gmail.com> on 2009/05/08 11:14:09 UTC
Comparing enums
Hi all
Can I compare XmlBeans-generated enums with ==, like Java enums? Or should I
always use equals(), to be on the safe side.
Thanks,
Hes.
RE: Comparing enums
Posted by Radu Preotiuc-Pietro <ra...@oracle.com>.
XMLBeans-generated Enums are indeed singletons, so == is safe.
Radu
________________________________
From: Hes Siemelink [mailto:hesnews@gmail.com]
Sent: Friday, May 08, 2009 5:14 AM
To: user@xmlbeans.apache.org
Subject: Comparing enums
Hi all
Can I compare XmlBeans-generated enums with ==, like Java enums? Or should I always use equals(), to be on the safe side.
Thanks,
Hes.