private final static List<String> generateIDForNucleotide(MonomerNotationUnitRNA object, String existingMonomerID,
			String newMonomerID) throws MonomerLoadingException, ChemistryException, CTKException {
		List<String> result = new ArrayList<String>();
		String hasChanged = null;
		StringBuilder sb = new StringBuilder();
		String id = "";
		for (MonomerNotation element : object.getContents()) {
			if (element.getUnit().equals(existingMonomerID)) {
				hasChanged = "";
				id = generateIDRNA(newMonomerID, element.getCount(), element.getAnnotation());
			} else {
				id = generateIDRNA(element.getUnit(), element.getCount(), element.getAnnotation());
			}
			sb.append(id);
		}
		try {
			if (!(Integer.parseInt(object.getCount()) == 1)) {
				sb.append("'" + object.getCount() + "'");
			}
		} catch (NumberFormatException e) {
			sb.append("'" + object.getCount() + "'");
		}
		if (object.getAnnotation() != null) {
			sb.append("\"" + object.getAnnotation() + "\"");
		}
		result.add(sb.toString());
		result.add(hasChanged);
		return result;
	}
private final static List < String > generateIDForNucleotide ( MonomerNotationUnitRNA object , String existingMonomerID , String newMonomerID ) throws MonomerLoadingException , ChemistryException , CTKException { List < String > result = new ArrayList < String > ( ) ; String hasChanged = null ; StringBuilder sb = new StringBuilder ( ) ; String id = "" ; for ( MonomerNotation element : object . getContents ( ) ) { if ( element . getUnit ( ) . equals ( existingMonomerID ) ) { hasChanged = "" ; id = generateIDRNA ( newMonomerID , element . getCount ( ) , element . getAnnotation ( ) ) ; } else { id = generateIDRNA ( element . getUnit ( ) , element . getCount ( ) , element . getAnnotation ( ) ) ; } sb . append ( id ) ; } try { if ( ! ( Integer . parseInt ( object . getCount ( ) ) == 1 ) ) { sb . append ( "'" + object . getCount ( ) + "'" ) ; } } catch ( NumberFormatException e ) { sb . append ( "'" + object . getCount ( ) + "'" ) ; } if ( object . getAnnotation ( ) != null ) { sb . append ( "\"" + object . getAnnotation ( ) + "\"" ) ; } result . add ( sb . toString ( ) ) ; result . add ( hasChanged ) ; return result ; }
method to replace the MonomerNotationUnitRNA having the MonomerID with
the new MonomerID

@param object
MonomerNotationUnitRNA
@param existingMonomerID
@param newMonomerID
@return List of MonomerNotationUnitRNA in String format and the
information if the MonomerNotationUnitRNA has to be changed
@throws MonomerLoadingException
@throws ChemistryException
@throws CTKException