I took a whack at this and found one bug even. Hopefully introduced no more.
But it does feel right. There are some instances, such  as with the axesMode
and with proteinStructure where we need to have an integer ID still and
refer to that because that is documented as being exposed.

Very interesting that if you do this:

enum EnumTest {

  TEST(1);

  public int id;

  EnumTest(int id) {
    this.id = id;
  }
}

Then even though TEST is a final static reference and can be used in static
classes, TEST.id is not and cannot, for example, be used in switch()
statements. I guess that's because the instantiation of an EnumTest is not
static, only its hidden reference identifier is. So that complicated things
-- there are a few cases where we need to have faster access to the class --
for example in coloring atoms -- and for that I also kept the constants.
That's not totally satisfying, but we would have to reserve a reference to
an Enum instead of a byte for every single atom if we did it more cleanly,
and I just don't want to do that. Or I'm missing  something. I did opt for
structure references to EnumStructure, and that worked very nicely. Still
have an ID there to distinguish proteins.

Bob

>
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to