segstore: remove redundancies in deprecated class
[deliverable/tracecompass.git] / statesystem / org.eclipse.tracecompass.segmentstore.core / src / org / eclipse / tracecompass / segmentstore / core / treemap / TreeMapStore.java
1 /*******************************************************************************
2 * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir and others.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.segmentstore.core.treemap;
14
15 import java.util.Collection;
16 import java.util.Iterator;
17 import java.util.TreeMap;
18
19 import org.eclipse.jdt.annotation.NonNull;
20 import org.eclipse.jdt.annotation.Nullable;
21 import org.eclipse.tracecompass.segmentstore.core.ISegment;
22 import org.eclipse.tracecompass.segmentstore.core.ISegmentStore;
23 import org.eclipse.tracecompass.segmentstore.core.SegmentStoreFactory;
24
25 /**
26 * Implementation of a {@link ISegmentStore} using in-memory {@link TreeMap}'s.
27 * This relatively simple implementation holds everything in memory, and as such
28 * cannot contain too much data.
29 *
30 * The TreeMapStore itself is Iterable, and its iteration order will be by
31 * ascending order of start times. For segments with identical start times, the
32 * secondary comparator will be the end time. If even those are equal, it will
33 * defer to the segments' natural ordering ({@link ISegment#compareTo}).
34 *
35 * The store's tree maps will not accept duplicate key-value pairs, which means
36 * that if you want several segments with the same start and end times, make
37 * sure their compareTo() differentiates them.
38 *
39 * Removal operations are not supported.
40 *
41 * @param <E>
42 * The type of segment held in this store
43 *
44 * @author Alexandre Montplaisir
45 * @deprecated Use the {@link SegmentStoreFactory} to create a new segment store
46 */
47 @Deprecated
48 public class TreeMapStore<@NonNull E extends ISegment> extends org.eclipse.tracecompass.internal.segmentstore.core.treemap.TreeMapStore<E> {
49
50 /**
51 * Constructor
52 */
53 public TreeMapStore() {
54 super();
55 }
56
57 // ------------------------------------------------------------------------
58 // Methods from Collection
59 // ------------------------------------------------------------------------
60
61 @Override
62 public Iterator<E> iterator() {
63 return super.iterator();
64 }
65
66 @Override
67 public boolean add(@Nullable E val) {
68 return super.add(val);
69 }
70
71 @Override
72 public int size() {
73 return super.size(); // me
74 }
75
76 @Override
77 public boolean isEmpty() {
78 return super.isEmpty();
79 }
80
81 @Override
82 public boolean contains(@Nullable Object o) {
83 return super.contains(o);
84 }
85
86 @Override
87 public boolean containsAll(@Nullable Collection<?> c) {
88 return super.containsAll(c);
89 }
90
91 @Override
92 public Object[] toArray() {
93 return super.toArray();
94 }
95
96 @Override
97 public <T> T[] toArray(T[] a) {
98 return super.toArray(a);
99 }
100
101 @Override
102 public boolean remove(@Nullable Object o) {
103 return super.remove(o);
104 }
105
106 @Override
107 public boolean addAll(@Nullable Collection<? extends E> c) {
108 return super.addAll(c);
109 }
110
111 @Override
112 public boolean removeAll(@Nullable Collection<?> c) {
113 return super.removeAll(c);
114 }
115
116 @Override
117 public boolean retainAll(@Nullable Collection<?> c) {
118 return super.retainAll(c);
119 }
120
121 @Override
122 public void clear() {
123 super.clear();
124 }
125
126 // ------------------------------------------------------------------------
127 // Methods added by ISegmentStore
128 // ------------------------------------------------------------------------
129
130 @Override
131 public Iterable<E> getIntersectingElements(long position) {
132 return super.getIntersectingElements(position);
133 }
134
135 @Override
136 public Iterable<E> getIntersectingElements(long start, long end) {
137 return super.getIntersectingElements(start, end);
138 }
139
140 @Override
141 public void dispose() {
142 super.dispose();
143 }
144 }
This page took 0.049674 seconds and 5 git commands to generate.