PIbd-23. Zakharov R.A. Lab work 05 #6

Closed
Zakharov_Rostislav wants to merge 10 commits from Lab5 into Lab4
Showing only changes of commit 99da8dad3d - Show all commits

View File

@ -4,6 +4,9 @@ import java.util.ArrayList;
public class SetGeneric<T extends Object>{
private final ArrayList<T> places;
public int getCount() {
return places.size();
}
private final int maxCount;
public SetGeneric(int count){
maxCount = count;
@ -26,9 +29,6 @@ public class SetGeneric<T extends Object>{
places.remove(position);
return true;
}
public int getCount() {
return places.size();
}
public T get(int position){
if(!(position >= 0 && position < places.size()))
return null;