String[] elems = this.getElementType(); double[] counts = this.getCount(); if (elems == null && counts == null) {
throw new RuntimeException("No children allowed for formula/atomArray"); String[] elements = atomArray.getElementType(); double[] counts = atomArray.getCount(); if (elements == null || counts == null) {
String[] elems = this.getElementType(); double[] counts = this.getCount(); int nelem = elems.length;
/** * Count for corresponding element. * * No defaults. * * @return double[] array of element counts; or null for none. */ public String[] getElementTypes() { CMLAtomArray atomArray = (getAtomArrayElements().size() == 0) ? null : getAtomArrayElements().get(0); return (atomArray == null) ? null : atomArray.getElementType(); }