/*
(non-Javadoc)

@see mtas.codec.tree.IntervalTree#addRangeEmpty(int, int)
18583
@Override
  final protected void addRangeEmpty(int left, int right) {
    String key = left + "_" + right;
    if (index.containsKey(key)) {
      // do nothing (empty...)
    } else {
      root = addRange(root, left, right, null);
      root.color = IntervalRBTreeNode.BLACK;
    }
  }
1094464
protected final void rangeCheck (int index, boolean insert)
    {
        if ((index < 0) || (insert ? (index > _size) : (index >= _size))) {
            throw new IndexOutOfBoundsException(
                "Index: " + index + ", Size: " + _size);
        }
    }
1327935
public void setRange( int minValue , int maxValue ) {
		this.maxValue = maxValue;
		this.minValue = minValue;

		histogram.resize(maxValue-minValue+1);
		histIndexes.resize(maxValue-minValue+1);
	}
1246557
public void setRange(int indices[]) {
        this.currentVal = Arrays.toString(indices); 								// "[1,2,3]"
		this.currentVal = this.currentVal.substring(1,this.currentVal.length()-1);	// "1,2,3"
    }
439169
public void addTransientRange(String id, RowRange range) {
    String start = DatatypeConverter.printHexBinary(range.getStart().toArray());
    String end = DatatypeConverter.printHexBinary(range.getEnd().toArray());

    appConfig.setProperty(PREFIX + id, start + ":" + end);
  }
743514
@Override
    public void removeRange(int fromIndex, int toIndex) {
        if (fromIndex > toIndex) {
            throw new IllegalArgumentException("fromIndex must be <= toIndex");
        }
        for (int i = toIndex; i >= fromIndex; i--) {
            removeElementAt(i);
        }
        fireIntervalRemoved(this, fromIndex, toIndex);
    }
739085
@UiThread
    public void expandParentRange(int startParentPosition, int parentCount) {
        int endParentPosition = startParentPosition + parentCount;
        for (int i = startParentPosition; i < endParentPosition; i++) {
            expandParent(i);
        }
    }
611366
public void removeRange(int first, int last) {
        int ele;

        for (ele = first; ele <= last; ele++) {
            remove(ele);
        }
    }
449399
public void setRange(String range) {
        String single = range.trim();
        int hyphenIndex = range.indexOf('-');

        if (hyphenIndex > 0) {
            this.start = rangeSingle(range.substring(0, hyphenIndex));
            this.end = rangeSingle(range.substring(hyphenIndex + 1));
        } else {
            int number = rangeSingle(range);
            if (number >= 0) { // first n attributes
                this.start = 0;
                this.end = number;
            } else { // last n attributes
                this.start = this.upperLimit + number > 0 ? this.upperLimit + number : 0;
                this.end = this.upperLimit - 1;
            }
        }
    }
178483
def add(self, interval: Interval) -> None:
        
        if interval is None:
            return
        if not isinstance(interval, Interval):
            raise TypeError(
                "Attempt to insert non-Interval into IntervalList")
        self.intervals.append(interval)
        self._tidy()
415944
public void addRangeExpr(final INodeReadTrx mTransaction) {

        assert getPipeStack().size() >= 2;

        final AbsAxis mOperand2 = getPipeStack().pop().getExpr();
        final AbsAxis mOperand1 = getPipeStack().pop().getExpr();

        final AbsAxis axis = new RangeAxis(mTransaction, mOperand1, mOperand2);
        if (getPipeStack().empty() || getExpression().getSize() != 0) {
            addExpressionSingle();
        }
        getExpression().add(axis);

    }
67271
public CirculantGraph addRange(long offset, long length) {
		Preconditions.checkArgument(offset >= MINIMUM_OFFSET,
			"Range offset must be at least " + MINIMUM_OFFSET);
		Preconditions.checkArgument(length <= vertexCount - offset,
			"Range length must not be greater than the vertex count minus the range offset.");

		offsetRanges.add(new OffsetRange(offset, length));

		return this;
	}
159373
private MtasRBTreeNode addRange(MtasRBTreeNode n, Integer left, Integer right,
      int additionalId, long additionalRef, Integer id, Long ref) {
    MtasRBTreeNode localN = n;
    if (localN == null) {
      String key = left.toString() + "_" + right.toString();
      localN = new MtasRBTreeNode(left, right, MtasRBTreeNode.RED, 1);
      localN.addIdAndRef(id, ref, additionalId, additionalRef);
      index.put(key, localN);
    } else {
      if (left <= localN.left) {
        localN.leftChild = addRange(localN.leftChild, left, right, additionalId,
            additionalRef, id, ref);
        updateMax(localN, localN.leftChild);
      } else {
        localN.rightChild = addRange(localN.rightChild, left, right,
            additionalId, additionalRef, id, ref);
        updateMax(localN, localN.rightChild);
      }
      if (isRed(localN.rightChild) && !isRed(localN.leftChild)) {
        localN = rotateLeft(localN);
      }
      if (isRed(localN.leftChild) && isRed(localN.leftChild.leftChild)) {
        localN = rotateRight(localN);
      }
      if (isRed(localN.leftChild) && isRed(localN.rightChild)) {
        flipColors(localN);
      }
      localN.n = size(localN.leftChild) + size(localN.rightChild) + 1;
    }
    return localN;
  }
741267
public static IntStream numberRangeWithCount(int start, int interval,
            int count) {
        return IntStream.iterate(start, n -> n + interval).limit(count);
    }
99929
public void addNumberRangeFilter(String key, SizeRange sizeRange) {
        JsonObject opObj = new JsonObject();

        if (sizeRange.getLowerBoundBytes() != 0) {
            opObj.add("gt", sizeRange.getLowerBoundBytes());
        }
        if (sizeRange.getUpperBoundBytes() != 0) {
            opObj.add("lt", sizeRange.getUpperBoundBytes());
        }

        this.filtersList.add(key, opObj);
    }
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;
      }
    }
  }
620422
public TimecodeRange add(SampleCount samples)
	{
		final Timecode newStart = start.add(samples);
		final Timecode newEnd = end.add(samples);

		return new TimecodeRange(newStart, newEnd);
	}