Polevoy S.V Lab_work3 #3

Merged
eegov merged 6 commits from LabWork03 into LabWork02 2022-10-28 09:28:55 +04:00
Showing only changes of commit b481b124a8 - Show all commits

View File

@ -9,11 +9,11 @@ public class SetArtilleriesGeneric<T> {
_places = new Object[count];
}
public int Insert(T artillery) {
return Insert(artillery, 0);
public int insert(T artillery) {
return insert(artillery, 0);
}
public int Insert(T artillery, int position) {
public int insert(T artillery, int position) {
if (position < 0 || position >= getCount()) {
return -1;
}
@ -46,7 +46,7 @@ public class SetArtilleriesGeneric<T> {
}
@SuppressWarnings("unchecked")
public T Remove(int position) {
public T remove(int position) {
if (position < 0 || position >= getCount())
{
return null;
@ -60,7 +60,7 @@ public class SetArtilleriesGeneric<T> {
}
@SuppressWarnings("unchecked")
public T Get(int position) {
public T get(int position) {
if (position < 0 || position >= getCount()) {
return null;
}