code: public boolean isSameType(Monomer m) {
      String analog1 = getNaturalAnalog();
      if (null == analog1) {
        analog1 = getAlternateId();
      }
      String analog2 = m.getNaturalAnalog();
      if (null == analog2) {
        analog2 = m.getAlternateId();
      }
      if (getMonomerType().equals(m.getMonomerType())
          && getPolymerType().equals(m.getPolymerType())
          && analog1.equals(analog2)) {
        return true;
      } else {
        return false;
      }
    }
docs: Compare this momoner with another one, polymerType, monomerType and
  naturalAnalog (could be derived) must be the same to return true
  
  @param m monomer
  @return true or false