From dfecf0ae59c131ab4e4485ab06d562758c251baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BE=D1=84=D1=8C=D1=8F=20=D0=AF=D0=BA=D0=BE=D0=B1?= =?UTF-8?q?=D1=87=D1=83=D0=BA?= Date: Sat, 2 Dec 2023 12:04:49 +0400 Subject: [PATCH] =?UTF-8?q?Revert=20"=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=B0=D1=80=D0=B8=D0=B5=D0=B2=20=D0=B4=D0=BB=D1=8F=20Set?= =?UTF-8?q?Generic"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c14bf37bcb8570b3d2090e6fbcedbcce18b098ae. --- Sailboat/Sailboat/SetGeneric.cs | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/Sailboat/Sailboat/SetGeneric.cs b/Sailboat/Sailboat/SetGeneric.cs index e719d1d..dd3b9d1 100644 --- a/Sailboat/Sailboat/SetGeneric.cs +++ b/Sailboat/Sailboat/SetGeneric.cs @@ -8,37 +8,17 @@ namespace Sailboat.Generics { internal class SetGeneric where T : class { - /// - /// Массив объектов, которые храним - /// private readonly T?[] _places; - /// - /// Количество объектов в массиве - /// public int Count => _places.Length; - /// - /// Конструктор - /// - /// public SetGeneric(int count) { _places = new T?[count]; } - /// - /// Добавление объекта в набор - /// - /// Добавляемая лодка - /// + public int Insert(T boat) { return Insert(boat, 0); } - /// - /// Добавление объекта в набор на конкретную позицию - /// - /// Добавляемая лодка - /// Позиция - /// public int Insert(T boat, int position) { int nullIndex = -1, i; @@ -70,11 +50,6 @@ namespace Sailboat.Generics _places[position] = boat; return position; } - /// - /// Удаление объекта из набора с конкретной позиции - /// - /// - /// public bool Remove(int position) { if (position < 0 || position >= Count) @@ -85,11 +60,6 @@ namespace Sailboat.Generics _places[position] = null; return true; } - /// - /// Получение объекта из набора по позиции - /// - /// - /// public T? Get(int position) { if (position < 0 || position >= Count)