AminoAcids { public static Map<String, IAminoAcid> getHashMapBySingleCharCode() { IAminoAcid[] monomers = createAAs(); HashMap<String, IAminoAcid> map = new HashMap<String, IAminoAcid>(); for (int i = 0; i < monomers.length; i++) { map.put((String) monomers[i].getProperty(RESIDUE_NAME_SHORT), monomers[i]); } return map; }  static int[][] aaBondInfo(); synchronized static AminoAcid[] createAAs(); static Map<String, IAminoAcid> getHashMapBySingleCharCode(); static Map<String, IAminoAcid> getHashMapByThreeLetterCode(); static String convertThreeLetterCodeToOneLetterCode(String threeLetterCode); static String convertOneLetterCodeToThreeLetterCode(String oneLetterCode); final static String RESIDUE_NAME; final static String RESIDUE_NAME_SHORT; final static String NO_ATOMS; final static String NO_BONDS; final static String ID; }
@Test public void testGetHashMapBySingleCharCode() { Map<String, IAminoAcid> map = AminoAcids.getHashMapBySingleCharCode(); Assert.assertNotNull(map); Assert.assertEquals(20, map.size()); String[] aas = {"G", "A", "V", "L"}; for (String aa1 : aas) { AminoAcid aa = (AminoAcid) map.get(aa1); Assert.assertNotNull("Did not find AA for: " + aa1, aa); } }