method to add an annotation at a specific position of the HELM2Notation

@param notation
new annotation
@param position
position of the new annotation
@param helm2notation
input HELM2Notation
495247
public final static void addAnnotation(final AnnotationNotation notation, final int position,
			final HELM2Notation helm2notation) {
		helm2notation.getListOfAnnotations().add(position, notation);
	}
1061542
def addNotation(self, obj):
        '''
        
        '''
        add = True
        wrap_notation = [
            Arpeggiate,
            NonArpeggiate,
            Slide,
            Glissando,
            Mark.Caesura,
            Mark.BreathMark,
            GraceNote]
        # method to handle addition of notation: done here to avoid repetitive
        # code in main parser
        if isinstance(obj, Ornaments.Tremolo) or isinstance(obj, Tuplet):
            if isinstance(obj, Ornaments.Tremolo):
                options = {1: 2, 2: 4, 3: 8}
                if hasattr(obj, "value"):
                    self.trem_length = options[obj.value]
            if hasattr(obj, "type"):
                if isinstance(obj, Ornaments.Tremolo) and obj.type != "single":
                    self.trem_length *= 2
                if obj.type == "stop":
                    self.closing_notation.append(obj)
                else:
                    self.prenotation.append(obj)
                return
            else:
                self.prenotation.append(obj)
                return
        if type(obj) in wrap_notation:
            if type(obj) == Slide and not hasattr(obj, "lineType"):
                self.postnotation.append(obj)
                return
            else:
                self.wrap_notation.append(obj)
                return
        if hasattr(obj, "type") and len(self.postnotation) > 0:
            duplicate_check = [
                True for thing in self.postnotation if hasattr(
                    thing,
                    "type") and thing.type == obj.type]
            if len(duplicate_check) > 0:
                add = False
        if len(self.postnotation) == 0 or add:
            self.postnotation.append(obj)
430665
public final static void addCountToMonomerNotation(PolymerNotation polymer, int position, String count) {
		polymer.getPolymerElements().getListOfElements().get(position).setCount(count);
	}
305609
public void addIgnoreFieldAnnotation( String annotationClassName ) {
      if( annotationClassName != null && !ignoreFieldAnnotations.contains( annotationClassName )) {
         ignoreFieldAnnotations.add(annotationClassName);
      }
   }
13289
public final static PolymerNotation addMonomerNotation(int position, PolymerNotation polymer,
			MonomerNotation monomerNotation) {
		polymer.getPolymerElements().getListOfElements().add(position, monomerNotation);
		return polymer;
	}
1170434
final public void addPositions(int[] positions) {
    if (positions != null && positions.length > 0) {
      if (tokenPosition == null) {
        tokenPosition = new MtasPosition(positions);
      } else {
        tokenPosition.add(positions);
      }
    }
  }
697223
public void setTranslation(Tuple2D<?> position) {
		assert position != null : AssertMessages.notNullParameter();
		this.curvilineTranslation = position.getX();
		this.shiftTranslation = position.getY();
        this.isIdentity = null;
	}
1356855
public void setRewindPositionOnce(@NonNull String frameName, int position) {
        if (getRewindPosition(frameName) >= 0)
            return;

        frames.get(frameName).setRewindPosition(position);
    }
798026
private HELM2Notation readNotation(String notation)
			throws ParserException, JDOMException, IOException, MonomerException, ChemistryException {
		/* xhelm notation */
		if (notation.contains("<Xhelm>")) {
			LOG.info("xhelm is used as input");
			String xhelm = notation;
			Element xHELMRootElement = getXHELMRootElement(xhelm);

			notation = xHelmNotationParser.getHELMNotationString(xHELMRootElement);
			MonomerStore store = xHelmNotationParser.getMonomerStore(xHELMRootElement);
			updateMonomerStore(store);

		}
		return HELM2NotationUtils.readNotation(notation);
	}
119441
public void indexAnnotation(final Annotation note) {
    if (search != null) {
      search.indexAnnotation(note).addErrback(new PluginError());
    }
    if( rt_publisher != null ) {
    	rt_publisher.publishAnnotation(note);
    }
  }
1130274
public void setPosition(Vector3f position) {
        setPosition(position.x, position.y, position.z);
    }
150160
public final static void addGroup(final GroupingNotation notation, final int position,
			final HELM2Notation helm2notation) {
		helm2notation.getListOfGroupings().add(position, notation);
	}
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);
	}
1191018
protected void addAnnotation(EObject element, XAnnotation annotation,
			IModificationContext context) throws Exception {
		final ICompositeNode node = NodeModelUtils.findActualNodeFor(annotation);
		if (node != null) {
			final IXtextDocument document = context.getXtextDocument();
			final int startOffset = node.getOffset();
			final int parameterOffset = getTools().getOffsetForPattern(document, startOffset,
					"@\\s*" + toPattern(annotation.getAnnotationType().getQualifiedName()) //$NON-NLS-1$
					+ "\\s*\\(\\s*"); //$NON-NLS-1$
			final int insertOffset;
			if (document.getChar(parameterOffset) == '{') {
				insertOffset = parameterOffset + getTools().getSpaceSize(document, parameterOffset + 1) + 1;
			} else {
				insertOffset = parameterOffset;
			}
			final ReplacingAppendable appendable = getTools().getAppendableFactory().create(document,
					(XtextResource) element.eResource(), insertOffset, 0);
			appendable.append("\""); //$NON-NLS-1$
			appendable.append(extractId(this.code));
			appendable.append("\", "); //$NON-NLS-1$
			appendable.commitChanges();
		}
	}
933304
@Override
    public Q addFlag(Position position, String prefix, Expression<?> expr) {
        Expression<?> flag = Expressions.template(expr.getType(), prefix + "{0}", expr);
        return queryMixin.addFlag(new QueryFlag(position, flag));
    }
763319
protected void addDeclaredAnnotation(String annotation, Map<CharSequence, Object> values) {
        if (annotation != null) {
            String repeatedName = getRepeatedName(annotation);
            if (repeatedName != null) {
                Object v = values.get(AnnotationMetadata.VALUE_MEMBER);
                if (v instanceof io.micronaut.core.annotation.AnnotationValue[]) {
                    io.micronaut.core.annotation.AnnotationValue[] avs = (io.micronaut.core.annotation.AnnotationValue[]) v;
                    for (io.micronaut.core.annotation.AnnotationValue av : avs) {
                        addDeclaredRepeatable(annotation, av);
                    }
                } else if (v instanceof Iterable) {
                    Iterable i = (Iterable) v;
                    for (Object o : i) {
                        if (o instanceof io.micronaut.core.annotation.AnnotationValue) {
                            addDeclaredRepeatable(annotation, ((io.micronaut.core.annotation.AnnotationValue) o));
                        }
                    }
                }
            } else {
                Map<String, Map<CharSequence, Object>> declaredAnnotations = getDeclaredAnnotationsInternal();
                Map<String, Map<CharSequence, Object>> allAnnotations = getAllAnnotations();
                addAnnotation(annotation, values, declaredAnnotations, allAnnotations, true);
            }
        }
    }
49725
public void add(int position) {
    if (mtasPositionType.equals(POSITION_SINGLE)) {
      if (position != mtasPositionStart) {
        if (position == (mtasPositionStart + 1)) {
          mtasPositionType = POSITION_RANGE;
          mtasPositionEnd = position;
        } else if (position == (mtasPositionStart - 1)) {
          mtasPositionType = POSITION_RANGE;
          mtasPositionEnd = mtasPositionStart;
          mtasPositionStart = position;
        } else {
          mtasPositionType = POSITION_SET;
          SortedSet<Integer> list = new TreeSet<>();
          list.add(position);
          list.add(mtasPositionStart);
          mtasPositionList = ArrayUtils
              .toPrimitive(list.toArray(new Integer[list.size()]));
          mtasPositionStart = list.first();
          mtasPositionEnd = list.last();
        }
      }
    } else {
      SortedSet<Integer> list = new TreeSet<>();
      if (mtasPositionType.equals(POSITION_RANGE)) {
        mtasPositionType = POSITION_SET;
        for (int i = mtasPositionStart; i <= mtasPositionEnd; i++) {
          list.add(i);
        }
        list.add(position);
      } else if (mtasPositionType.equals(POSITION_SET)) {
        for (int p : mtasPositionList) {
          list.add(p);
        }
        list.add(position);
      }
      mtasPositionList = ArrayUtils
          .toPrimitive(list.toArray(new Integer[list.size()]));
      mtasPositionStart = list.first();
      mtasPositionEnd = list.last();
      if (list.size() == (1 + mtasPositionEnd - mtasPositionStart)) {
        mtasPositionType = POSITION_RANGE;
        mtasPositionList = null;
      }
    }
  }