From db978d6c67680bf75edd27342ef085a21147b603 Mon Sep 17 00:00:00 2001 From: sdburns1998 Date: Sun, 7 Jul 2019 18:16:17 +0200 Subject: [PATCH] raidsthieving: use interface instead of type --- .../client/plugins/raidsthieving/BatSolver/BatSolver.java | 7 ++++--- .../client/plugins/raidsthieving/ChestOverlay.java | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raidsthieving/BatSolver/BatSolver.java b/runelite-client/src/main/java/net/runelite/client/plugins/raidsthieving/BatSolver/BatSolver.java index 4f59a5c241..5a338979f8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raidsthieving/BatSolver/BatSolver.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raidsthieving/BatSolver/BatSolver.java @@ -29,6 +29,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.TreeSet; import static net.runelite.client.plugins.raidsthieving.BatSolver.SolutionSet.SOLUTION_SETS; @@ -37,7 +38,7 @@ public class BatSolver private Map numberOfSolutionsWithPoison; private final SolutionSet solution; - private final HashSet grubsChests; + private final Set grubsChests; public BatSolver(final ThievingRoomType roomType) { @@ -59,9 +60,9 @@ public class BatSolver calculateChanceOfPoison(); } - public TreeSet matchSolutions() + public Set matchSolutions() { - TreeSet possibleEmptyChests = new TreeSet<>(); + Set possibleEmptyChests = new TreeSet<>(); for (SolutionSet knownSolution : SolutionSet.SOLUTION_SETS) { if (knownSolution.getType() == solution.getType() && matchSolution(knownSolution)) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raidsthieving/ChestOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/raidsthieving/ChestOverlay.java index 03c34ce7c0..c2f037646b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raidsthieving/ChestOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raidsthieving/ChestOverlay.java @@ -28,7 +28,7 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import java.util.Map; -import java.util.TreeSet; +import java.util.Set; import javax.inject.Inject; import javax.inject.Singleton; import net.runelite.api.Client; @@ -120,7 +120,7 @@ public class ChestOverlay extends Overlay BatSolver solver = plugin.getSolver(); if (solver != null && chestId != -1) { - TreeSet matches = solver.matchSolutions(); + Set matches = solver.matchSolutions(); return matches.contains(chestId) || matches.size() == 0; } return true;