3068df843a49e171d3f07778481f54ec6b58a88f
1 /*******************************************************************************
2 * Copyright (c) 2016 École Polytechnique de Montréal
4 * All rights reserved. This program and the accompanying materials are
5 * made 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
.segmentstore
.core
.segment
.interfaces
;
12 import org
.eclipse
.jdt
.annotation
.Nullable
;
13 import org
.eclipse
.tracecompass
.segmentstore
.core
.ISegment
;
16 * Interface to return some fields of a segment depending on the interfaces it
21 public final class SegmentAspects
{
23 private SegmentAspects() {
28 * Get the name aspect of a segment. If the segment is a
29 * {@link INamedSegment}, the aspect will return its name. Otherwise, it is
33 * The segment to get the aspect of
34 * @return The name of a {@link INamedSegment}, <code>null</code> otherwise
36 public static @Nullable String
getName(ISegment segment
) {
37 if (segment
instanceof INamedSegment
) {
38 return ((INamedSegment
) segment
).getName();
This page took 0.030428 seconds and 4 git commands to generate.