delete useless comments
This commit is contained in:
parent
9a97f4378d
commit
20fa07507f
@ -26,7 +26,6 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T> where T : c
|
|||||||
}
|
}
|
||||||
public T? Get(int position)
|
public T? Get(int position)
|
||||||
{
|
{
|
||||||
//todo
|
|
||||||
if (position >= 0 && position < Count)
|
if (position >= 0 && position < Count)
|
||||||
{
|
{
|
||||||
return _collection[position];
|
return _collection[position];
|
||||||
@ -36,7 +35,6 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T> where T : c
|
|||||||
}
|
}
|
||||||
public int Insert(T obj)
|
public int Insert(T obj)
|
||||||
{
|
{
|
||||||
//todo
|
|
||||||
for (int i = 0; i < Count; i++)
|
for (int i = 0; i < Count; i++)
|
||||||
{
|
{
|
||||||
if (_collection[i] == null)
|
if (_collection[i] == null)
|
||||||
@ -50,12 +48,10 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T> where T : c
|
|||||||
}
|
}
|
||||||
public int Insert(T obj, int position)
|
public int Insert(T obj, int position)
|
||||||
{
|
{
|
||||||
//todo
|
|
||||||
if (!(position > 0 && position < _collection.Length))
|
if (!(position > 0 && position < _collection.Length))
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_collection[position] == null)
|
if (_collection[position] == null)
|
||||||
_collection[position] = obj;
|
_collection[position] = obj;
|
||||||
else
|
else
|
||||||
@ -68,7 +64,6 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T> where T : c
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = position - 1; i >= 0; i--)
|
for (int i = position - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (_collection[i] == null)
|
if (_collection[i] == null)
|
||||||
@ -86,7 +81,6 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T> where T : c
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
T? deletedElement = _collection[position];
|
T? deletedElement = _collection[position];
|
||||||
_collection[position] = null;
|
_collection[position] = null;
|
||||||
return deletedElement;
|
return deletedElement;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user