code: public boolean add(IAtomContainer mol, String label) {
  
          if (label == null || label.isEmpty())
              return false;
  
          // required invariants and check for number of attachment points
          int numAttach = 0;
          for (IAtom atom : mol.atoms()) {
              if (atom.getImplicitHydrogenCount() == null || atom.getAtomicNumber() == null)
                  throw new IllegalArgumentException("Implicit hydrogen count or atomic number is null");
              if (atom.getAtomicNumber() == 0)
                  numAttach++;
          }
  
          switch (numAttach) {
              case 0:
                  return addDisconnectedAbbreviation(mol, label);
              case 1:
                  return addConnectedAbbreviation(mol, label);
              default:
                  // not-supported yet - update JavaDoc if added
                  return false;
          }
      }
docs: Add an abbreviation to the factory. Abbreviations can be of various flavour based
  on the number of attachments:
  <p>
  
  <b>Detached</b> - zero attachments, the abbreviation covers the whole structure (e.g. THF)
  <b>Terminal</b> - one attachment, covers substituents (e.g. Ph for Phenyl)
  <b>Linker</b> - [NOT SUPPORTED YET] two attachments, covers long repeated chains (e.g. PEG4)
  <p>
  Attachment points (if present) must be specified with zero element atoms.
  <pre>
  *c1ccccc1 Ph
  *OC(=O)C OAc
  </pre>
  
  @param mol   the fragment to abbreviate
  @param label the label of the fragment
  @return the abbreviation was added