From ea80fd92571a7e84e397bab38cb1024811d0426b Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Wed, 11 Jun 2014 00:31:31 +0200 Subject: [PATCH] [cooja] skins/TrafficVisualizerSkin: Use LinkedList instead of ArrayList to increase add and remove performance --- .../contikios/cooja/plugins/skins/TrafficVisualizerSkin.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java b/tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java index b1ab3633f..ee60bd367 100644 --- a/tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java +++ b/tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java @@ -33,7 +33,8 @@ import java.awt.Color; import java.awt.Graphics; import java.awt.Point; import java.awt.Polygon; -import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; import java.util.Observable; import java.util.Observer; @@ -69,7 +70,7 @@ public class TrafficVisualizerSkin implements VisualizerSkin { private Visualizer visualizer = null; private AbstractRadioMedium radioMedium = null; - private ArrayList historyList = new ArrayList(); + private List historyList = new LinkedList<>(); private RadioConnectionArrow[] history = null; private Observer radioMediumObserver = new Observer() {