удалён комм. код
This commit is contained in:
parent
69bc174b89
commit
6e8888240b
@ -34,21 +34,6 @@ namespace Lab1ContainersShip
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="car">Добавляемый автомобиль</param>
|
/// <param name="car">Добавляемый автомобиль</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/*public int Insert(T ship)
|
|
||||||
{
|
|
||||||
// TODO вставка в начало набора
|
|
||||||
if(_places.Count >= _maxCount)
|
|
||||||
{
|
|
||||||
throw new StorageOverflowException();
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_places.Insert(0, ship);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
public bool Insert(T ship, IEqualityComparer<T?>? equal = null)
|
public bool Insert(T ship, IEqualityComparer<T?>? equal = null)
|
||||||
{
|
{
|
||||||
return Insert(ship, 0, equal);
|
return Insert(ship, 0, equal);
|
||||||
@ -79,14 +64,6 @@ namespace Lab1ContainersShip
|
|||||||
{
|
{
|
||||||
throw new ShipNotFoundException(position);
|
throw new ShipNotFoundException(position);
|
||||||
}
|
}
|
||||||
/*if(position == _places.Count)
|
|
||||||
{
|
|
||||||
_places.Add(ship);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_places.Insert(position, ship);
|
|
||||||
}*/
|
|
||||||
if (equal != null && _places.Contains(ship, equal))
|
if (equal != null && _places.Contains(ship, equal))
|
||||||
{
|
{
|
||||||
throw new ApplicationException("уже есть");
|
throw new ApplicationException("уже есть");
|
||||||
|
@ -60,7 +60,6 @@ namespace Lab1ContainersShip
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//return collect?._collection.Insert(obj) ?? -1;
|
|
||||||
return (bool)collect?._collection.Insert(obj, new DrawiningShipEqutables());
|
return (bool)collect?._collection.Insert(obj, new DrawiningShipEqutables());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user