Commit | Line | Data |
---|---|---|
739b9fec AM |
1 | /******************************************************************************* |
2 | * Copyright (c) 2016 EfficiOS Inc., Alexandre Montplaisir | |
3 | * | |
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 | *******************************************************************************/ | |
9 | ||
10 | package org.eclipse.tracecompass.internal.provisional.tmf.core.views.timegraph2; | |
11 | ||
12 | import java.util.List; | |
13 | ||
14 | import com.google.common.base.Objects; | |
15 | import com.google.common.collect.ImmutableList; | |
16 | ||
17 | public class TimeGraphTreeElement { | |
18 | ||
19 | private final String fName; | |
20 | private final List<TimeGraphTreeElement> fChildElements; | |
21 | ||
22 | public TimeGraphTreeElement(String name, List<TimeGraphTreeElement> children) { | |
23 | fName = name; | |
24 | fChildElements = ImmutableList.copyOf(children); | |
25 | } | |
26 | ||
27 | public String getName() { | |
28 | return fName; | |
29 | } | |
30 | ||
31 | public List<TimeGraphTreeElement> getChildElements() { | |
32 | return fChildElements; | |
33 | } | |
34 | ||
35 | @Override | |
36 | public String toString() { | |
37 | return Objects.toStringHelper(this) | |
38 | .add("fName", fName) //$NON-NLS-1$ | |
39 | .add("fChildElements", fChildElements.toString()) //$NON-NLS-1$ | |
40 | .toString(); | |
41 | } | |
42 | ||
43 | } |