method to add a new MonomerNotation to a PolymerNotation

@param position
position of the new MonomerNotation
@param polymer
PolymerNotation
@param monomerNotation
new MonomerNotation
@return PolymerNotation with the new MonomerNotation
13289
public final static PolymerNotation addMonomerNotation(int position, PolymerNotation polymer,
			MonomerNotation monomerNotation) {
		polymer.getPolymerElements().getListOfElements().add(position, monomerNotation);
		return polymer;
	}
1073525
public final static void addConnection(final ConnectionNotation notation, final int position,
			final HELM2Notation helm2notation) {
		helm2notation.getListOfConnections().add(position, notation);
	}
1248450
private static Element createAndAppendPosition(
            String elementID, Element positions, IPerson person) throws PortalException {
        if (LOG.isDebugEnabled()) LOG.debug("Adding Position Set entry " + elementID + ".");

        String ID = null;

        try {
            ID = getDLS().getNextStructDirectiveId(person);
        } catch (Exception e) {
            throw new PortalException(
                    "Exception encountered while "
                            + "generating new position node "
                            + "Id for userId="
                            + person.getID(),
                    e);
        }
        Document plf = positions.getOwnerDocument();
        Element position = plf.createElement(Constants.ELM_POSITION);
        position.setAttribute(Constants.ATT_TYPE, Constants.ELM_POSITION);
        position.setAttribute(Constants.ATT_ID, ID);
        position.setAttributeNS(Constants.NS_URI, Constants.ATT_NAME, elementID);
        positions.appendChild(position);
        return position;
    }
1192055
public static Node setAllPositions(Node node, Position position) {
		node.setPosition(position);
		for (Node child : node.getChildren()) setAllPositions(child, position);
		return node;
	}
	
	/**
	 * Get the current lombok.ast version.
	 */
	public static String getVersion() {
		return Version.getVersion();
	}
	
	public static CompilationUnit upToTop(Node node) {
		while (node != null && !(node instanceof CompilationUnit)) node = node.getParent();
		return (CompilationUnit) node;
	}
}
103453
public synchronized void addNewMonomer(Monomer monomer) throws IOException,
      MonomerException {
    monomer.setNewMonomer(true);
    addMonomer(monomer, true);
  }
448245
public void addReaction(IReaction reaction, int position) {
        hashMapChain.put(reaction, position);
        this.addReaction(reaction);
    }
363729
public void updatePosition(final BitfinexPosition position) {
		
		synchronized (positions) {
			// Replace position
			positions.removeIf(p -> p.getCurrencyPair() == position.getCurrencyPair());
			positions.add(position);
			positions.notifyAll();
		}
		
		notifyCallbacks(position);
	}
594786
public static TypeAnnotationPosition
        localVariable(final List<TypePathEntry> location,
                      final JCLambda onLambda,
                      final int pos) {
        return new TypeAnnotationPosition(TargetType.LOCAL_VARIABLE, pos,
                                          Integer.MIN_VALUE, onLambda,
                                          Integer.MIN_VALUE, Integer.MIN_VALUE,
                                          location);
    }
1005506
public final static List<PolymerNotation> getPeptidePolymers(List<PolymerNotation> polymers) {
    List<PolymerNotation> peptidePolymers = new ArrayList<PolymerNotation>();
    for (PolymerNotation polymer : polymers) {
      if (polymer.getPolymerID() instanceof PeptideEntity) {
        peptidePolymers.add(polymer);
      }
    }
    return peptidePolymers;
  }
440676
public static <SOURCE, TARGET> AddAll<SOURCE, TARGET> to(Position.Readable<TARGET> targetPosition,
        Position.Readable<SOURCE> sourcePosition) {
        return new AddAll<>(sourcePosition, targetPosition);
    }
533760
public QueryParameters updatePosition(String key, Integer position) {
        while (this.order.size() < position + 1) {
            this.order.add(null);
        }

        this.order.set(position, processKey(key));

        return this;
    }
975330
def new_completion_from_position(self, position):
        
        assert isinstance(position, int) and position - self.start_position >= 0

        return Completion(
            text=self.text[position - self.start_position:],
            display=self.display,
            display_meta=self._display_meta,
            get_display_meta=self._get_display_meta)
277660
protected static String generateFastaFromPeptide(List<Monomer> monomers) {
		StringBuilder fasta = new StringBuilder();
		for (Monomer monomer : monomers) {
			fasta.append(monomer.getNaturalAnalog());
		}
		return fasta.toString();
	}
46678
public Position add( Position position ) {
        if (this.getIndexInContent() < 0) {
            return position.getIndexInContent() < 0 ? EMPTY_CONTENT_POSITION : position;
        }

        if (position.getIndexInContent() < 0) {
            return this;
        }

        int index = this.getIndexInContent() + position.getIndexInContent();
        int line = position.getLine() + this.getLine() - 1;
        int column = this.getLine() == 1 ? this.getColumn() + position.getColumn() : this.getColumn();

        return new Position(index, line, column);
    }
553259
public void placeRing(IRing ring, Point2d ringCenter, double bondLength, Map<Integer, Double> startAngles) {
        double radius = this.getNativeRingRadius(ring, bondLength);
        double addAngle = 2 * Math.PI / ring.getRingSize();

        IAtom startAtom = ring.getAtom(0);
        Point2d p = new Point2d(ringCenter.x + radius, ringCenter.y);
        startAtom.setPoint2d(p);
        double startAngle = Math.PI * 0.5;

        /*
         * Different ring sizes get different start angles to have visually
         * correct placement
         */
        int ringSize = ring.getRingSize();
        if (startAngles.get(ringSize) != null) startAngle = startAngles.get(ringSize);

        List<IBond> bonds = ring.getConnectedBondsList(startAtom);
        /*
         * Store all atoms to draw in consecutive order relative to the chosen
         * bond.
         */
        Vector<IAtom> atomsToDraw = new Vector<IAtom>();
        IAtom currentAtom = startAtom;
        IBond currentBond = (IBond) bonds.get(0);
        for (int i = 0; i < ring.getBondCount(); i++) {
            currentBond = ring.getNextBond(currentBond, currentAtom);
            currentAtom = currentBond.getOther(currentAtom);
            atomsToDraw.addElement(currentAtom);
        }
        atomPlacer.populatePolygonCorners(atomsToDraw, ringCenter, startAngle, addAngle, radius);
    }
633370
private void addPosition(final GraphObjectMap item, final Hint hint, final int cursorLine, final int replaceFrom, final int replaceTo) {

		final GraphObjectMap fromObject = new GraphObjectMap();
		final GraphObjectMap toObject   = new GraphObjectMap();

		fromObject.put(line, cursorLine);
		fromObject.put(ch, replaceFrom);

		toObject.put(line, cursorLine);
		toObject.put(ch, replaceTo);

		item.put(from, fromObject);
		item.put(to, toObject);
	}
380371
public final static void deleteAnnotationFromMonomerNotation(PolymerNotation polymer, int position) {
		polymer.getPolymerElements().getListOfElements().get(position).setAnnotation(null);
	}