diff --git a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ICollectionGenericObjects.cs b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ICollectionGenericObjects.cs index fd644eb..35ae5c5 100644 --- a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ICollectionGenericObjects.cs +++ b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ICollectionGenericObjects.cs @@ -25,7 +25,7 @@ public interface ICollectionGenericObjects /// Добавляемый объект /// Cравнение двух объектов /// true - вставка прошла удачно, false - вставка не удалась - bool Insert(T obj, IEqualityComparer? comparer = null); + bool Insert(T obj, IEqualityComparer? comparer = null); /// /// Добавление объекта в коллекцию на конкретную позицию @@ -34,7 +34,7 @@ public interface ICollectionGenericObjects /// Позиция /// Cравнение двух объектов /// true - вставка прошла удачно, false - вставка не удалась - bool Insert(T obj, int position, IEqualityComparer? comparer = null); + bool Insert(T obj, int position, IEqualityComparer? comparer = null); /// /// Удаление объекта из коллекции с конкретной позиции diff --git a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ListGenericObjects.cs b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ListGenericObjects.cs index 541584f..a53135e 100644 --- a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ListGenericObjects.cs +++ b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ListGenericObjects.cs @@ -32,10 +32,6 @@ public class ListGenericObjects : ICollectionGenericObjects } - public CollectionType GetCollectionType => throw new NotImplementedException(); - - public int MaxCount { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } - public CollectionType GetCollectionType => throw new NotImplementedException(); /// @@ -53,7 +49,7 @@ public class ListGenericObjects : ICollectionGenericObjects return _collection[position]; } - public bool Insert(T obj, IEqualityComparer? comparer = null) + public bool Insert(T obj, IEqualityComparer? comparer = null) { // TODO проверка, что не превышено максимальное количество элементов // TODO выброс ошибки, если переполнение @@ -61,7 +57,7 @@ public class ListGenericObjects : ICollectionGenericObjects return true; } - public bool Insert(T obj, int position, IEqualityComparer? comparer = null) + public bool Insert(T obj, int position, IEqualityComparer? comparer = null) { // TODO проверка, что не превышено максимальное количество элементов // TODO выброс ошибки, если переполнение diff --git a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/MassiveGenericObjects.cs b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/MassiveGenericObjects.cs index c6ff9d0..071898e 100644 --- a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/MassiveGenericObjects.cs @@ -57,14 +57,15 @@ public class MassiveGenericObjects : ICollectionGenericObjects return _collection[position]; } - public bool Insert(T obj, IEqualityComparer? comparer = null) + public bool Insert(T obj, IEqualityComparer? comparer = null) { + // TODO выборс ошибки, если такой объект есть в коллекции // TODO вставка в свободное место набора // TODO выброс ошибки, если переполнение return false; } - public bool Insert(T obj, int position, IEqualityComparer? comparer = null) + public bool Insert(T obj, int position, IEqualityComparer? comparer = null) { // TODO выборс ошибки, если такой объект есть в коллекции // TODO проверка позиции