1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.tmf
.core
.segment
;
12 import java
.util
.Comparator
;
14 import org
.eclipse
.jdt
.annotation
.Nullable
;
15 import org
.eclipse
.tracecompass
.segmentstore
.core
.ISegment
;
18 * An aspect is a piece of information that can be extracted, directly or
19 * indirectly, from a segment {@link ISegment}.
21 * The aspect can then be used to populate table columns, to filter
22 * on to only keep certain segments, to plot XY charts, etc.
24 * Inspired by ITmfEventAspect implementation.
26 * @author Bernd Hufmann
29 public interface ISegmentAspect
{
32 * Static definition of an empty string.
34 String EMPTY_STRING
= ""; //$NON-NLS-1$
37 * Get the name of this aspect. This name will be user-visible and, as such,
38 * should be localized.
40 * @return The name of this aspect.
45 * Return a descriptive help text of what this aspect does. This could then
46 * be shown in tooltip or in option dialogs for instance. It should also be
49 * @return The help text of this aspect
54 * Gets the comparator to be used when comparing to segments.
55 * @return the comparator to be used when comparing to segments
57 @Nullable Comparator
<?
> getComparator();
60 * The "functor" representing this aspect. Basically, what to do for an
61 * segment that is passed in parameter.
63 * Users also can (and should) provide a more specific return type than
67 * The segment to process
68 * @return The resulting information for this segment.
70 @Nullable Object
resolve(ISegment segment
);
This page took 0.032665 seconds and 5 git commands to generate.