1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
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
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
;
14 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.ITraceInfo
;
17 * <b><u>TraceInfo</u></b>
19 * Implementation of the base trace information interface (ITraceInfo) to
23 public class TraceInfo
implements ITraceInfo
{
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
29 * The name of the element.
31 private String fName
= null;
33 // ------------------------------------------------------------------------
35 // ------------------------------------------------------------------------
38 * @param name - name of trace element
40 public TraceInfo(String name
) {
42 throw new IllegalArgumentException();
49 * @param other - the instance to copy
51 public TraceInfo(TraceInfo other
) {
53 throw new IllegalArgumentException();
55 fName
= String
.valueOf(other
.fName
);
59 // ------------------------------------------------------------------------
61 // ------------------------------------------------------------------------
64 * @see org.eclipse.linuxtools.lttng.ui.views.control.model.ITraceInfo#getName()
67 public String
getName() {
73 * @see org.eclipse.linuxtools.lttng.ui.views.control.model.ITraceInfo#setName(java.lang.String)
76 public void setName(String name
) {
82 * @see java.lang.Object#hashCode()
85 public int hashCode() {
89 return fName
.hashCode();
94 * @see java.lang.Object#equals(java.lang.Object)
97 public boolean equals(Object other
) {
98 if (!(other
instanceof TraceInfo
)) {
102 TraceInfo otherInfo
= (TraceInfo
) other
;
103 return fName
.equals(otherInfo
.fName
);
108 * @see java.lang.Object#toString()
110 @SuppressWarnings("nls")
112 public String
toString() {
113 StringBuffer output
= new StringBuffer();
114 output
.append("[TraceInfo(");
115 output
.append("Name=");
116 output
.append(getName());
118 return output
.toString();
This page took 0.033277 seconds and 6 git commands to generate.