From: Etienne Bergeron Date: Tue, 26 Nov 2013 01:49:28 +0000 (-0500) Subject: tmf: Remove unused TmfSortedArray. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=d29c8d600dd676154cc008082b792a6d111e2186;p=deliverable%2Ftracecompass.git tmf: Remove unused TmfSortedArray. This data-structure seems unused. It's implemented with an insertion sort, and won't scale. Change-Id: I49ae518a384817c4fd537c989240454e00f6f38b Signed-off-by: Etienne Bergeron Reviewed-on: https://git.eclipse.org/r/18875 Reviewed-by: Matthew Khouzam Tested-by: Hudson CI Reviewed-by: Bernd Hufmann Reviewed-by: Alexandre Montplaisir IP-Clean: Alexandre Montplaisir --- diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java deleted file mode 100644 index a93d4a291f..0000000000 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011, 2012 Ericsson - * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Francois Chouinard - Initial API and implementation - *******************************************************************************/ - -package org.eclipse.linuxtools.tmf.core.util; - -import java.util.ArrayList; - -/** - * Implementation of a sorted array list. - * - * @param The array element type - * - * @version 1.0 - * @author Francois Chouinard - */ - -public class TmfSortedArrayList extends ArrayList { - private static final long serialVersionUID = 1L; - - /** - * Inserts a new value in the list according to its sorted position. - * - * @param value A value to insert - */ - @SuppressWarnings("unchecked") - public void insertSorted(T value) { - add(value); - Comparable cmp = (Comparable) value; - for (int pos = size() - 1; pos > 0 && cmp.compareTo(get(pos - 1)) < 0; pos--) { - T tmp = get(pos); - set(pos, get(pos - 1)); - set(pos - 1, tmp); - } - } - -}