+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2016 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
- *******************************************************************************/
-
-package org.eclipse.tracecompass.segmentstore.core.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-
-import java.util.Arrays;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.segmentstore.core.ISegmentStore;
-import org.eclipse.tracecompass.segmentstore.core.treemap.TreeMapStore;
-import org.junit.Test;
-
-/**
- * Unit tests for intersecting elements in a TreeMapStore
- *
- * @author France Lapointe Nguyen
- * @deprecated the test is deprecated as the store is deprecated
- */
-@Deprecated
-public class OldTreeMapStoreTest extends AbstractTestSegmentStore {
-
- @Override
- protected ISegmentStore<@NonNull TestSegment> getSegmentStore() {
- return new TreeMapStore<>();
- }
-
- @Override
- protected ISegmentStore<@NonNull TestSegment> getSegmentStore(TestSegment [] data) {
- TreeMapStore<@NonNull TestSegment> treeMapStore = new TreeMapStore<>();
- treeMapStore.addAll(Arrays.asList(data));
- return treeMapStore;
- }
-
- /**
- * Try adding duplicate elements, they should be ignored
- */
- @Test
- public void testNoDuplicateElements() {
- for (TestSegment segment : SEGMENTS) {
- boolean ret = fSegmentStore.add(new TestSegment(segment.getStart(), segment.getEnd(), segment.getPayload()));
- assertFalse(ret);
- }
- assertEquals(SEGMENTS.size(), fSegmentStore.size());
- }
-}
\ No newline at end of file
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.tracecompass.segmentstore.core;singleton:=true
Bundle-Activator: org.eclipse.tracecompass.internal.segmentstore.core.Activator
org.eclipse.tracecompass.internal.segmentstore.core.segmentHistoryTree;x-friends:="org.eclipse.tracecompass.segmentstore.core.tests",
org.eclipse.tracecompass.internal.segmentstore.core.treemap;x-friends:="org.eclipse.tracecompass.segmentstore.core.tests",
org.eclipse.tracecompass.segmentstore.core,
- org.eclipse.tracecompass.segmentstore.core.segment.interfaces,
- org.eclipse.tracecompass.segmentstore.core.treemap
+ org.eclipse.tracecompass.segmentstore.core.segment.interfaces
Import-Package: com.google.common.annotations,
com.google.common.base,
com.google.common.collect
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir and others.
- *
- * 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.segmentstore.core.treemap;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.TreeMap;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.segmentstore.core.ISegment;
-import org.eclipse.tracecompass.segmentstore.core.ISegmentStore;
-import org.eclipse.tracecompass.segmentstore.core.SegmentStoreFactory;
-
-/**
- * Implementation of a {@link ISegmentStore} using in-memory {@link TreeMap}'s.
- * This relatively simple implementation holds everything in memory, and as such
- * cannot contain too much data.
- *
- * The TreeMapStore itself is Iterable, and its iteration order will be by
- * ascending order of start times. For segments with identical start times, the
- * secondary comparator will be the end time. If even those are equal, it will
- * defer to the segments' natural ordering ({@link ISegment#compareTo}).
- *
- * The store's tree maps will not accept duplicate key-value pairs, which means
- * that if you want several segments with the same start and end times, make
- * sure their compareTo() differentiates them.
- *
- * Removal operations are not supported.
- *
- * @param <E>
- * The type of segment held in this store
- *
- * @author Alexandre Montplaisir
- * @deprecated Use the {@link SegmentStoreFactory} to create a new segment store
- */
-@Deprecated
-public class TreeMapStore<@NonNull E extends ISegment> extends org.eclipse.tracecompass.internal.segmentstore.core.treemap.TreeMapStore<E> {
-
- /**
- * Constructor
- */
- public TreeMapStore() {
- super();
- }
-
- // ------------------------------------------------------------------------
- // Methods from Collection
- // ------------------------------------------------------------------------
-
- @Override
- public Iterator<E> iterator() {
- return super.iterator();
- }
-
- @Override
- public boolean add(@Nullable E val) {
- return super.add(val);
- }
-
- @Override
- public int size() {
- return super.size(); // me
- }
-
- @Override
- public boolean isEmpty() {
- return super.isEmpty();
- }
-
- @Override
- public boolean contains(@Nullable Object o) {
- return super.contains(o);
- }
-
- @Override
- public boolean containsAll(@Nullable Collection<?> c) {
- return super.containsAll(c);
- }
-
- @Override
- public Object[] toArray() {
- return super.toArray();
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return super.toArray(a);
- }
-
- @Override
- public boolean remove(@Nullable Object o) {
- return super.remove(o);
- }
-
- @Override
- public boolean addAll(@Nullable Collection<? extends E> c) {
- return super.addAll(c);
- }
-
- @Override
- public boolean removeAll(@Nullable Collection<?> c) {
- return super.removeAll(c);
- }
-
- @Override
- public boolean retainAll(@Nullable Collection<?> c) {
- return super.retainAll(c);
- }
-
- @Override
- public void clear() {
- super.clear();
- }
-
- // ------------------------------------------------------------------------
- // Methods added by ISegmentStore
- // ------------------------------------------------------------------------
-
- @Override
- public Iterable<E> getIntersectingElements(long position) {
- return super.getIntersectingElements(position);
- }
-
- @Override
- public Iterable<E> getIntersectingElements(long start, long end) {
- return super.getIntersectingElements(start, end);
- }
-
- @Override
- public void dispose() {
- super.dispose();
- }
-
-}