Thread: ArrayLists
View Single Post
Old Nov 11th, 2006, 7:08 AM   #9
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,007
Rep Power: 5 lectricpharaoh will become famous soon enough
Another thing you could do is write a class to represent amino acids. It would have methods to get the values associated with a particular amino acid (or you could just expose them as public final constants), an enum definition for the various acids (so that you could not construct an object except for a valid amino acid), and a variable storing the enum value for this particular instance. Assuming you implement the proper interfaces, such as Comparable, you could then create an array of the suckers, and sort, search, etc the array.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote