From 99da8dad3d9b815abd052f62b8713458b325b407 Mon Sep 17 00:00:00 2001 From: Zakharov_Rostislav <r.z.8102.80@gmail.com> Date: Fri, 22 Dec 2023 20:28:13 +0400 Subject: [PATCH] lab6 some minor fixes --- src/generics/SetGeneric.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generics/SetGeneric.java b/src/generics/SetGeneric.java index ace58ef..fd11902 100644 --- a/src/generics/SetGeneric.java +++ b/src/generics/SetGeneric.java @@ -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;