private void createTable ( ) { if ( oxidationStateTable == null ) { oxidationStateTable = new HashMap < String , int [ ] > ( ) ; oxidationStateTable . put ( "H" , new int [ ] { 1 } ) ; // oxidationStateTable.put("Li", 1); // oxidationStateTable.put("Be", 2); oxidationStateTable . put ( "B" , new int [ ] { 3 } ) ; oxidationStateTable . put ( "C" , new int [ ] { 4 } ) ; oxidationStateTable . put ( "N" , new int [ ] { 3 } ) ; oxidationStateTable . put ( "O" , new int [ ] { 2 } ) ; oxidationStateTable . put ( "F" , new int [ ] { 1 } ) ; oxidationStateTable . put ( "Na" , new int [ ] { 1 } ) ; oxidationStateTable . put ( "Mg" , new int [ ] { 2 } ) ; oxidationStateTable . put ( "Al" , new int [ ] { 3 } ) ; oxidationStateTable . put ( "Si" , new int [ ] { 4 } ) ; oxidationStateTable . put ( "P" , new int [ ] { 3 , 5 } ) ; oxidationStateTable . put ( "S" , new int [ ] { 2 , 4 , 6 } ) ; oxidationStateTable . put ( "Cl" , new int [ ] { 1 } ) ; // oxidationStateTable.put("K", 1); // oxidationStateTable.put("Ca", 2); // oxidationStateTable.put("Ga", 3); // oxidationStateTable.put("Ge", 4); // oxidationStateTable.put("As", 5); // oxidationStateTable.put("Se", 6); // oxidationStateTable.put("Br", 7); // oxidationStateTable.put("Rb", 1); // oxidationStateTable.put("Sr", 2); // oxidationStateTable.put("In", 3); // oxidationStateTable.put("Sn", 4); // oxidationStateTable.put("Sb", 5); // oxidationStateTable.put("Te", 6); oxidationStateTable . put ( "I" , new int [ ] { 1 } ) ; // oxidationStateTable.put("Cs", 1); // oxidationStateTable.put("Ba", 2); // oxidationStateTable.put("Tl", 3); // oxidationStateTable.put("Pb", 4); // oxidationStateTable.put("Bi", 5); // oxidationStateTable.put("Po", 6); // oxidationStateTable.put("At", 7); // oxidationStateTable.put("Fr", 1); // oxidationStateTable.put("Ra", 2); // oxidationStateTable.put("Cu", 2); // oxidationStateTable.put("Mn", 2); // oxidationStateTable.put("Co", 2); } }
Create the table with the common oxidation states