From 5e3858a3ab92e9cae6cb59a10899b4ce01133301 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 26 Mar 2013 13:53:50 +0200 Subject: [PATCH] Convert HashSet to EnumSet for better performance --- src/ro/ieval/fonbot/FonBotMainService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ro/ieval/fonbot/FonBotMainService.java b/src/ro/ieval/fonbot/FonBotMainService.java index 753425d..47fdafc 100644 --- a/src/ro/ieval/fonbot/FonBotMainService.java +++ b/src/ro/ieval/fonbot/FonBotMainService.java @@ -4,7 +4,7 @@ import static ro.ieval.fonbot.R.string.*; import static ro.ieval.fonbot.Utils.toNonNull; import java.util.Collections; -import java.util.HashSet; +import java.util.EnumSet; import java.util.Set; import org.eclipse.jdt.annotation.Nullable; @@ -102,7 +102,7 @@ public final class FonBotMainService extends Service { /** * Set of ongoing events. */ - private final Set ongoing=new HashSet(10); + private final Set ongoing=EnumSet.noneOf(OngoingEvent.class); /** * Get the set of ongoing events. -- 2.39.2