[cooja] skins/TrafficVisualizerSkin: Use LinkedList instead of ArrayList to increase add and remove performance

This commit is contained in:
Enrico Joerns 2014-06-11 00:31:31 +02:00
parent c92f83c048
commit ea80fd9257

View file

@ -33,7 +33,8 @@ import java.awt.Color;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Point; import java.awt.Point;
import java.awt.Polygon; import java.awt.Polygon;
import java.util.ArrayList; import java.util.LinkedList;
import java.util.List;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
@ -69,7 +70,7 @@ public class TrafficVisualizerSkin implements VisualizerSkin {
private Visualizer visualizer = null; private Visualizer visualizer = null;
private AbstractRadioMedium radioMedium = null; private AbstractRadioMedium radioMedium = null;
private ArrayList<RadioConnectionArrow> historyList = new ArrayList<RadioConnectionArrow>(); private List<RadioConnectionArrow> historyList = new LinkedList<>();
private RadioConnectionArrow[] history = null; private RadioConnectionArrow[] history = null;
private Observer radioMediumObserver = new Observer() { private Observer radioMediumObserver = new Observer() {