if (toTest.size() > 0) {
elementIsNested = true;
}
Type listType = toTest.getSBaseListType();
if (listType == Type.none) {
// Prevent writing invalid SBML if list types are
// not set appropriately.
throw new SBMLException(String.format(
"Unknown ListOf type \"%s\".",
toTest.getElementName()));
}
if (listType.equals(ListOf.Type.listOfReactants)
|| listType.equals(ListOf.Type.listOfProducts)
|| listType.equals(ListOf.Type.listOfModifiers)) {
if (toTest.size() < 1) {
continue; // Skip these, see reference in
// comment above.
}
}