Convert HashSet to EnumSet for better performance
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 26 Mar 2013 11:53:50 +0000 (13:53 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 26 Mar 2013 11:53:50 +0000 (13:53 +0200)
src/ro/ieval/fonbot/FonBotMainService.java

index 753425d18081daa9a54c67eb1f2c2ac8248f5612..47fdafc38ee290e07b07662f947314f75efa7f82 100644 (file)
@@ -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<OngoingEvent> ongoing=new HashSet<OngoingEvent>(10);
+       private final Set<OngoingEvent> ongoing=EnumSet.noneOf(OngoingEvent.class);
 
        /**
         * Get the set of ongoing events.
This page took 0.010832 seconds and 4 git commands to generate.