/* public void fixAtomsOfBond(){ // do fix bonds of Atom first ArrayList<Atom> temp = new ArrayList<Atom>(atomList.size()); ArrayList<Bond> temp2 = new ArrayList<Bond>(bondList.size()); for(int i = 0; i < temp2.size(); i++){ // iterates bondList for(int j = 0; j < atomList.size(); j++){//iterates atomlist temp2 = atomList.get(j).getAdjacentBonds(); for(int k = 0; k < temp2.size(); k++){ //iterates bonds on atomList if(temp2.get(k).getEdgeNum() == bondList.get(k).getEdgeNum()){ temp.set(k, bondList.get(j)); } } bondList.get(i).setAdjacentAtoms(temp); } } } */ public String toString() { String temp = " "; if (atomList == null) { return "Null found for atomList"; } for (Atom a : atomList) { temp = temp.concat(a.toString()) + "\n"; } if (bondList == null) { return "Null found for bondList"; } if (bondList.isEmpty()) { temp += " bondList is empty"; // return "bondList is empty"; } for (Bond b : bondList) { temp = temp.concat(b.toString()) + "\n"; } return temp; }