public LineRangeList(final Collection<LineRange> copy) { data = new byte[copy.size() * 4]; // guess for (LineRange lr : copy) { add(lr); } }
public LineRangeList(final Collection<LineRange> copy) { data = new byte[copy.size() * 4]; // guess for (LineRange lr : copy) { add(lr); } }
/** * Adds another line range to this annotation. * * @param lineRange * the line range to add */ public void addLineRange(final LineRange lineRange) { if (!lineRanges.contains(lineRange)) { lineRanges.add(lineRange); } }
/** * Adds another line range to this annotation. * * @param lineRange * the line range to add */ public void addLineRange(final LineRange lineRange) { if (!lineRanges.contains(lineRange)) { lineRanges.add(lineRange); } }
/** * Creates a new instance of <code>AbstractAnnotation</code>. * * @param message * the message of the warning * @param start * the first line of the line range * @param end * the last line of the line range * @param category * the category of the annotation * @param type * the type of the annotation */ @edu.umd.cs.findbugs.annotations.SuppressWarnings("ST") public AbstractAnnotation(final String message, final int start, final int end, final String category, final String type) { this.message = TreeString.of(StringUtils.strip(message)); this.category = StringUtils.defaultString(category); this.type = StringUtils.defaultString(type); key = currentKey++; lineRanges = new LineRangeList(); lineRanges.add(new LineRange(start, end)); primaryLineNumber = start; contextHashCode = currentKey; }
/** * Creates a new instance of <code>AbstractAnnotation</code>. * * @param message * the message of the warning * @param start * the first line of the line range * @param end * the last line of the line range * @param category * the category of the annotation * @param type * the type of the annotation */ @SuppressFBWarnings("ST") public AbstractAnnotation(final String message, final int start, final int end, final String category, final String type) { this.message = TreeString.of(StringUtils.strip(message)); this.category = defaultString(category); this.type = defaultString(type); key = currentKey++; lineRanges = new LineRangeList(); lineRanges.add(new LineRange(start, end)); primaryLineNumber = start; contextHashCode = currentKey; }