public override void ClearAndSetNewLength(int newLength) { if (newLength < 0) { throw new ArgumentException("Chain length shouldn't be less than 0."); } intervalsManager = null; length = newLength; positions = new List<int>(); }